gcc/testsuite/c-c++-common/gomp/pr85696.c
raw| 1 | /* PR c/85696 */ |
| 2 | |
| 3 | #ifndef __cplusplus |
| 4 | void |
| 5 | foo (int n, int a[][n]) |
| 6 | { |
| 7 | #pragma omp parallel shared(a) default(none) |
| 8 | #pragma omp master |
| 9 | a[23][0] = 42; |
| 10 | } |
| 11 | #endif |
| 12 | |
| 13 | void |
| 14 | bar (int n, void *p) |
| 15 | { |
| 16 | int (*a)[n] = (int (*)[n]) p; |
| 17 | #pragma omp parallel shared(a) default(none) |
| 18 | #pragma omp master |
| 19 | a[23][0] = 42; |
| 20 | } |