2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / g++.dg / vect / pr33834_2.cc
blob1230ca31441373c746c2a9c2ad0c9b8542859286
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -ftree-vectorize" } */
4 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
6 extern int sscanf (__const char *__restrict __s,
7 __const char *__restrict __format, ...);
8 unsigned char got_elevation_pattern;
9 struct site
11 float antenna_pattern[361][1001];
13 LR;
14 void
15 LoadPAT (char *filename)
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, &amplitude);
22 for (y = 0; y <= 1000; y++)
24 if (got_elevation_pattern)
25 elevation = elevation_pattern[x][y];
26 else
27 elevation = 1.0;
28 LR.antenna_pattern[x][y] = elevation;
32 /* { dg-final { cleanup-tree-dump "vect" } } */