]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/cilk-plus/jump-openmp.c
[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / cilk-plus / jump-openmp.c
CommitLineData
64e5ace5
TS
1/* { dg-do compile } */
2/* { dg-options "-fcilkplus -fopenmp" } */
3/* { dg-require-effective-target fopenmp } */
4
5int *a, *b, c;
6
7void foo()
8{
9#pragma simd
10 for (int i=0; i < 1000; ++i)
11 {
12 a[i] = b[i];
13 if (c == 5)
41dbbb37 14 return; /* { dg-error "invalid branch to/from Cilk Plus structured block" } */
64e5ace5
TS
15 }
16}
17
18void bar()
19{
20#pragma simd
21 for (int i=0; i < 1000; ++i)
22 {
23 lab:
24 a[i] = b[i];
25 }
26 if (c == 6)
27 goto lab; /* { dg-error "invalid entry to Cilk Plus structured block" } */
28}
29
30void baz()
31{
32 bad1:
33 #pragma omp parallel
41dbbb37 34 goto bad1; /* { dg-error "invalid branch to/from OpenMP structured block" } */
64e5ace5
TS
35
36 goto bad2; /* { dg-error "invalid entry to OpenMP structured block" } */
37 #pragma omp parallel
38 {
39 bad2: ;
40 }
41
42 #pragma omp parallel
43 {
44 int i;
45 goto ok1;
46 for (i = 0; i < 10; ++i)
47 { ok1: break; }
48 }
49}