summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/block-9.C
blob: 8012e5a7d46fca2ff1e74ba0b4712217717045a1 (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)
  {
  #pragma omp parallel
    { case 0:; }		// { dg-error "jump|enters" }
  #pragma omp for
    for (j = 0; j < 10; ++ j)
      { case 1:; }		// { dg-error "jump|enters" }
  #pragma omp critical
    { case 2:; }		// { dg-error "jump|enters" }
  #pragma omp master
    { case 3:; }		// { dg-error "jump|enters" }
  #pragma omp sections
    { case 4:;			// { dg-error "jump|enters" }
    #pragma omp section
       { case 5:; }		// { dg-error "jump|enters" }
    }
  #pragma omp ordered
    { default:; }		// { dg-error "jump|enters" }
  }
}