blob: c31aa61583ff2ff36b78d2189cb0af9e2b0a9657 (
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
|
// { dg-do compile }
void
foo (int x)
{
bad1: // { dg-error "jump to label" }
#pragma omp taskgroup
goto bad1; // { dg-message "from here|exits OpenMP" }
goto bad2; // { dg-message "from here" }
#pragma omp taskgroup
{
bad2: ; // { dg-error "jump to label" }
// { dg-message "enters OpenMP" "" { target *-*-* } 13 }
}
#pragma omp taskgroup
{
int i;
goto ok1;
for (i = 0; i < 10; ++i)
{ ok1: break; }
}
switch (x)
{
#pragma omp taskgroup
{ case 0:; } // { dg-error "jump" }
// { dg-message "enters" "" { target *-*-* } 28 }
}
}
// { dg-error "invalid branch to/from an OpenMP structured block" "" { target *-*-* } 8 }
// { dg-error "invalid entry to OpenMP structured block" "" { target *-*-* } 10 }
|