summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/block-10.C
blob: b273c1f297c1d6354f3792323689ac6ab6583e39 (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
35
36
37
38
39
40
// { dg-do compile }

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