gcc/testsuite/c-c++-common/gomp/pr91920.c
raw| 1 | /* PR middle-end/91920 */ |
| 2 | |
| 3 | void bar (float *); |
| 4 | |
| 5 | void |
| 6 | foo (void) |
| 7 | { |
| 8 | int i; |
| 9 | float f[3] = { 0.0f, 0.0f, 0.0f }; |
| 10 | #pragma omp parallel for default(none) reduction(+:f[:3]) |
| 11 | for (i = 0; i < 1000; i++) |
| 12 | { |
| 13 | int j; |
| 14 | float k[3] = { 0.25f, 0.5f, 0.75f }; |
| 15 | for (j = 0; j < 3; j++) |
| 16 | f[j] += k[j]; |
| 17 | } |
| 18 | bar (f); |
| 19 | } |