aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/default-1.c
blob: eab46892dada40d3d810cbabf78dc059af9f77e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
void
foo (void)
{
  int x = 0, i;
  #pragma omp task default(none)	/* { dg-message "note: enclosing 'task'" } */
  {
    x++;	/* { dg-error "'x' not specified in enclosing 'task'" } */
  }
  #pragma omp taskloop default(none)	/* { dg-message "note: enclosing 'taskloop'" } */
  for (i = 0; i < 64; i++)
    {
      x++;	/* { dg-error "'x' not specified in enclosing 'taskloop'" } */
    }
  #pragma omp teams default(none)	/* { dg-message "note: enclosing 'teams'" } */
  {
    x++;	/* { dg-error "'x' not specified in enclosing 'teams'" } */
  }
  #pragma omp parallel default(none)	/* { dg-message "note: enclosing 'parallel'" } */
  {
    x++;	/* { dg-error "'x' not specified in enclosing 'parallel'" } */
  }
}