gcc/testsuite/gcc.dg/gomp/sections-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | extern void bar(int); |
| 4 | void foo(void) |
| 5 | { |
| 6 | #pragma omp sections |
| 7 | bar (0); // { dg-error "expected" } |
| 8 | |
| 9 | #pragma omp sections |
| 10 | { |
| 11 | } // { dg-error "expected" } |
| 12 | |
| 13 | #pragma omp sections |
| 14 | { |
| 15 | bar (1); |
| 16 | } |
| 17 | |
| 18 | #pragma omp sections |
| 19 | { |
| 20 | #pragma omp section |
| 21 | bar(2); |
| 22 | bar(3); |
| 23 | bar(4); |
| 24 | #pragma omp section |
| 25 | bar(5); |
| 26 | bar(6); |
| 27 | bar(7); |
| 28 | } |
| 29 | } |