summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/vect/pr33834_2.cc
blob: 1230ca31441373c746c2a9c2ad0c9b8542859286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* { dg-do compile } */
/* { dg-options "-O3 -ftree-vectorize" } */

/* Testcase by Martin Michlmayr <tbm@cyrius.com> */

extern int sscanf (__const char *__restrict __s,
                  __const char *__restrict __format, ...);
unsigned char got_elevation_pattern;
struct site
{
  float antenna_pattern[361][1001];
}
LR;
void
LoadPAT (char *filename)
{
  int x, y;
  char string[255];
  float elevation, amplitude, elevation_pattern[361][1001];
  for (x = 0; filename[x] != '.' ; x++)
    sscanf (string, "%f %f", &elevation, &amplitude);
  for (y = 0; y <= 1000; y++)
  {
    if (got_elevation_pattern)
      elevation = elevation_pattern[x][y];
    else
      elevation = 1.0;
    LR.antenna_pattern[x][y] = elevation;
  }
}

/* { dg-final { cleanup-tree-dump "vect" } } */