diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/block-9.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/block-9.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/block-9.c b/gcc/testsuite/gcc.dg/gomp/block-9.c new file mode 100644 index 00000000000..9217cb74990 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/block-9.c @@ -0,0 +1,25 @@ +// { dg-do compile } + +void foo(int i) +{ + int j; + switch (i) // { dg-error "invalid entry" } + { + #pragma omp parallel + { case 0:; } + #pragma omp for + for (j = 0; j < 10; ++ j) + { case 1:; } + #pragma omp critical + { case 2:; } + #pragma omp master + { case 3:; } + #pragma omp sections + { case 4:; + #pragma omp section + { case 5:; } + } + #pragma omp ordered + { default:; } + } +} |