| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-O3" } */ |
| 3 |
|
| 4 |
/* Testcase by Martin Michlmayr <[email protected]> */ |
| 5 |
|
| 6 |
extern int sscanf (__const char *__restrict __s, |
| 7 |
__const char *__restrict __format, ...); |
| 8 |
unsigned char got_elevation_pattern; |
| 9 |
struct site |
| 10 |
{ |
| 11 |
float antenna_pattern[361][1001]; |
| 12 |
} |
| 13 |
LR; |
| 14 |
void |
| 15 |
LoadPAT (char *filename) |
| 16 |
{ |
| 17 |
int x, y; |
| 18 |
char string[255]; |
| 19 |
float elevation, amplitude, elevation_pattern[361][1001]; |
| 20 |
for (x = 0; filename[x] != '.' ; x++) |
| 21 |
sscanf (string, "%f %f", &elevation, &litude); |
| 22 |
for (y = 0; y <= 1000; y++) |
| 23 |
{ |
| 24 |
if (got_elevation_pattern) |
| 25 |
elevation = elevation_pattern[x][y]; |
| 26 |
else |
| 27 |
elevation = 1.0; |
| 28 |
LR.antenna_pattern[x][y] = elevation; |
| 29 |
} |
| 30 |
} |
| 31 |
|