blob: c5c38d8b537be230e7396e6c35ff8e920e4b8bcb (
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
|
/* { dg-do compile } */
void
foo (int x, int y)
{
bad1:
#pragma omp target data map(tofrom: y)
goto bad1; // { dg-error "invalid branch to/from OpenMP structured block" }
goto bad2; // { dg-error "invalid entry to OpenMP structured block" }
#pragma omp target data map(tofrom: y)
{
bad2: ;
}
#pragma omp target data map(tofrom: y)
{
int i;
goto ok1;
for (i = 0; i < 10; ++i)
{ ok1: break; }
}
switch (x) // { dg-error "invalid entry to OpenMP structured block" }
{
#pragma omp target data map(tofrom: y) // { dg-warning "statement will never be executed" }
{ case 0:; }
}
}
|