summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/pr35751.c
blob: f7777a5b79a526306bf578bf5401c4208a9de147 (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
33
34
/* PR c/35751 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */

void
foo (int i)
{
  extern int a[i];	/* { dg-error "must have no linkage|storage size of" } */
  static int b[i];	/* { dg-error "storage size of" } */

#pragma omp parallel
  {
    a[0] = 0;
    b[0] = 0;
  }

#pragma omp parallel shared (a, b)
  {
    a[0] = 0;
    b[0] = 0;
  }

#pragma omp parallel private (a, b)
  {
    a[0] = 0;
    b[0] = 0;
  }

#pragma omp parallel firstprivate (a, b)
  {
    a[0] = 0;
    b[0] = 0;
  }
}