diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/block-7.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/block-7.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/block-7.c b/gcc/testsuite/gcc.dg/gomp/block-7.c new file mode 100644 index 00000000000..802b3b3a383 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/block-7.c @@ -0,0 +1,20 @@ +// { dg-do compile } + +void foo() +{ + int i, j; + for (i = 0; i < 10; ++i) + { + #pragma omp for + for (j = ({ continue; 0; }); // { dg-error "invalid exit" } + j < ({ continue; 10; }); // { dg-error "invalid exit" } + j += ({ continue; 1; })) // { dg-error "invalid exit" } + continue; + + #pragma omp for + for (j = ({ break; 0; }); // { dg-error "invalid exit" } + j < ({ break; 10; }); // { dg-error "invalid exit" } + j += ({ break; 1; })) // { dg-error "invalid exit" } + break; // { dg-error "break" } + } +} |