gcc/testsuite/c-c++-common/gomp/pr102431.c
raw| 1 | /* PR middle-end/102431 */ |
| 2 | |
| 3 | struct S { int s; } s; |
| 4 | void add (struct S *, struct S *); |
| 5 | void init (struct S *); |
| 6 | void bar (int i, struct S *); |
| 7 | #pragma omp declare reduction (+:struct S:add (&omp_out, &omp_in)) initializer (init (&omp_priv)) |
| 8 | |
| 9 | void |
| 10 | foo (void) |
| 11 | { |
| 12 | int i; |
| 13 | #pragma omp loop bind(teams) reduction(+:s) |
| 14 | for (i = 0; i < 8; i++) |
| 15 | bar (i, &s); |
| 16 | } |