1 /* { dg-do compile } */ 2 3 void foo(int x)4foo (int x) 5 { 6 bad1: 7 #pragma omp taskgroup 8 goto bad1; // { dg-error "invalid branch to/from OpenMP structured block" } 9 10 goto bad2; // { dg-error "invalid entry to OpenMP structured block" } 11 #pragma omp taskgroup 12 { 13 bad2: ; 14 } 15 16 #pragma omp taskgroup 17 { 18 int i; 19 goto ok1; 20 for (i = 0; i < 10; ++i) 21 { ok1: break; } 22 } 23 24 switch (x) // { dg-error "invalid entry to OpenMP structured block" } 25 { 26 #pragma omp taskgroup // { dg-warning "statement will never be executed" } 27 { case 0:; } 28 } 29 } 30