[powerpc] [testsuite] reorder dg directives [PR106069]
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / block-3.c
blob0b21cb3923cfc6742e8ba8dfb31e79058b2f5745
1 // { dg-do compile }
3 extern int test(int);
4 void foo()
6 int i;
8 for (i = 0; i < 10; ++i)
10 #pragma omp sections
12 continue; // { dg-error "invalid branch to/from OpenMP structured block" }
16 #pragma omp sections
18 #pragma omp section
19 { bad1: ; }
20 #pragma omp section
21 goto bad1; // { dg-error "invalid branch to/from OpenMP structured block" }
24 #pragma omp sections
26 goto bad2; // { dg-error "invalid branch to/from OpenMP structured block" }
28 bad2:;
30 goto bad3; // { dg-error "invalid entry to OpenMP structured block" }
31 #pragma omp sections
33 bad3: ;
36 #pragma omp sections
39 goto ok1;
40 ok1:;
42 #pragma omp section
43 for (i = 0; i < 10; ++i)
44 if (test(i))
45 break;
46 else
47 continue;
49 #pragma omp section
50 switch (i)
52 case 0:
53 break;
54 default:
55 test(i);