Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / pr82374.c
blob453266ed84e690200ee72a44a33427e03714eb99
1 /* PR tree-optimization/82374 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-vect-details" } */
4 /* { dg-additional-options "-mavx -mno-avx2" { target i?86-*-* x86_64-*-* } } */
5 /* { dg-additional-options "-mvsx" { target powerpc_vsx_ok } } */
7 #define SIZE (1024 * 1024)
9 float a[SIZE];
10 float b[SIZE];
11 float c[SIZE];
12 float d[SIZE];
14 __attribute__((optimize ("O2", "tree-vectorize"))) void
15 foo (void)
17 int i;
18 #pragma omp parallel for
19 for (i = 0; i < SIZE; i++)
20 c[i] = a[i] + b[i];
23 __attribute__((optimize ("O2", "tree-vectorize"))) void
24 bar (void)
26 int i;
27 for (i = 0; i < SIZE; i++)
28 d[i] = a[i] + b[i];
31 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { { i?86-*-* x86_64-*-* } || { powerpc_vsx_ok } } } } } */