summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/block-9.c
blob: 9217cb74990232687cb5e2c381a71c319d30abd2 (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
// { dg-do compile }

void foo(int i)
{
  int j;
  switch (i)			// { dg-error "invalid entry" }
  {
  #pragma omp parallel
    { case 0:; }
  #pragma omp for
    for (j = 0; j < 10; ++ j)
      { case 1:; }
  #pragma omp critical
    { case 2:; }
  #pragma omp master
    { case 3:; }
  #pragma omp sections
    { case 4:;
    #pragma omp section
       { case 5:; }
    }
  #pragma omp ordered
    { default:; }
  }
}