1 /* PR middle-end/52547 */
2 /* { dg-do run } */
3
4 extern void abort (void);
5
6 __attribute__((noinline, noclone)) int
baz(int * x,int (* fn)(int *))7 baz (int *x, int (*fn) (int *))
8 {
9 return fn (x);
10 }
11
12 __attribute__((noinline, noclone)) int
foo(int x,int * y)13 foo (int x, int *y)
14 {
15 int i, e = 0;
16 #pragma omp parallel for reduction(|:e)
17 for (i = 0; i < x; ++i)
18 {
19 __label__ lab;
20 int bar (int *z) { return z - y; }
21 if (baz (&y[i], bar) != i)
22 e |= 1;
23 }
24 return e;
25 }
26
27 int
main()28 main ()
29 {
30 int a[100], i;
31 for (i = 0; i < 100; i++)
32 a[i] = i;
33 if (foo (100, a))
34 abort ();
35 return 0;
36 }
37