gcc/testsuite/gcc.dg/gomp/pr91063.c
raw| 1 | /* PR tree-optimization/91063 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fopenmp-simd" } */ |
| 4 | /* { dg-additional-options "-mavx512f" { target { i?86-*-* x86_64-*-* } } } */ |
| 5 | |
| 6 | struct S { void *s; }; |
| 7 | |
| 8 | int |
| 9 | foo (struct S *x) |
| 10 | { |
| 11 | int r = 0; |
| 12 | int i; |
| 13 | #pragma omp simd reduction (+ : r) |
| 14 | for (i = 0; i < 64; ++i) |
| 15 | r += (int) (x->s != 0); |
| 16 | return r; |
| 17 | } |