Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / teams-1.c
bloba5370470cde6b754cd83077e9d6faf16d4cc3ea6
1 /* { dg-do compile } */
3 void
4 foo (int x)
6 bad1:
7 #pragma omp target teams
8 goto bad1; // { dg-error "invalid branch to/from OpenMP structured block" }
10 goto bad2; // { dg-error "invalid entry to OpenMP structured block" }
11 #pragma omp target teams
13 bad2: ;
16 #pragma omp target teams
18 int i;
19 goto ok1;
20 for (i = 0; i < 10; ++i)
21 { ok1: break; }
24 switch (x) // { dg-error "invalid entry to OpenMP structured block" }
26 #pragma omp target teams
27 { case 0:; } // { dg-warning "statement will never be executed" }
31 void
32 bar (int x)
34 bad1:
35 #pragma omp target
36 #pragma omp teams
37 goto bad1; // { dg-error "invalid branch to/from OpenMP structured block" }
39 goto bad2; // { dg-error "invalid entry to OpenMP structured block" }
40 #pragma omp target
41 #pragma omp teams
43 bad2: ;
46 #pragma omp target
47 #pragma omp teams
49 int i;
50 goto ok1;
51 for (i = 0; i < 10; ++i)
52 { ok1: break; }
55 switch (x) // { dg-error "invalid entry to OpenMP structured block" }
57 #pragma omp target // { dg-warning "statement will never be executed" }
58 #pragma omp teams
59 { case 0:; }