summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/pr30494.c
blob: 6a042ce69746fbf65192cf2ef575725a6357484a (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
/* PR middle-end/30494 */
/* { dg-do compile } */

int
foo (int n)
{
  int i;
#pragma omp for
  for (i = 0; i < 6; i++)
    {
      int v[n], w[n * 3 + i];
      v[0] = 1;
      w[0] = 2;
    }
  return 0;
}

int
bar (int n)
{
  int i;
#pragma parallel omp for
  for (i = 0; i < 6; i++)
    {
      int v[n], w[n * 3 + i];
      v[0] = 1;
      w[0] = 2;
    }
  return 0;
}