gcc/testsuite/c-c++-common/gomp/sink-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fopenmp" } */ |
| 3 | |
| 4 | /* Test that we can handle multiple undeclared sink variables |
| 5 | gracefully. */ |
| 6 | |
| 7 | void bar (int *); |
| 8 | |
| 9 | void |
| 10 | foo () |
| 11 | { |
| 12 | int i,j; |
| 13 | #pragma omp parallel for ordered(1) |
| 14 | for (i=0; i < 100; ++i) |
| 15 | { |
| 16 | #pragma omp ordered depend(sink:poo-1,paa+1) /* { dg-error "poo.*declared.*paa.*declared" } */ |
| 17 | bar(&i); |
| 18 | #pragma omp ordered depend(source) |
| 19 | } |
| 20 | } |