Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / pr46032-3.c
bloba4af7ec4a8abe4f3c0d945abfd8e01a106ef3972
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fopenmp -std=c99 -fipa-pta -fdump-tree-optimized" } */
4 #define N 2
6 int
7 foo (void)
9 int a[N], c[N];
10 int *ap = &a[0];
11 int *bp = &a[0];
12 int *cp = &c[0];
14 #pragma omp parallel for
15 for (unsigned int idx = 0; idx < N; idx++)
17 ap[idx] = 1;
18 bp[idx] = 2;
19 cp[idx] = ap[idx];
22 return *cp;
25 /* { dg-final { scan-tree-dump-times "\\] = 1;" 1 "optimized" } } */
26 /* { dg-final { scan-tree-dump-times "\\] = 2;" 1 "optimized" } } */
27 /* { dg-final { scan-tree-dump-times "\\] = _\[0-9\]*;" 1 "optimized" } } */
28 /* { dg-final { scan-tree-dump-times "\\] = " 3 "optimized" } } */