PR target/82855
[official-gcc.git] / libgomp / testsuite / libgomp.c / pr70680-1.c
blob389fdd3729152d4eb5bcd07a171b50fe03619bfc
1 /* PR middle-end/70680 */
3 int v;
5 void
6 f1 (void)
8 int i = 0;
9 #pragma omp task default(shared) if(0)
11 #pragma omp simd
12 for (i = 0; i < 100; i++)
14 v = i;
16 if (i != 100)
17 __builtin_abort ();
20 void
21 f2 (void)
23 int i = 0;
24 #pragma omp task default(shared) if(0)
26 #pragma omp simd
27 for (i = 0; i < 100; i++)
30 if (i != 100)
31 __builtin_abort ();
34 void
35 f3 (void)
37 int i = 0;
38 #pragma omp task default(shared) if(0)
40 #pragma omp simd linear(i: 1)
41 for (i = 0; i < 100; i++)
43 v = i;
45 if (i != 100)
46 __builtin_abort ();
49 void
50 f4 (void)
52 int i = 0;
53 #pragma omp task default(shared) if(0)
55 #pragma omp simd linear(i: 1)
56 for (i = 0; i < 100; i++)
59 if (i != 100)
60 __builtin_abort ();
63 int
64 main ()
66 f1 ();
67 if (v++ != 100)
68 __builtin_abort ();
69 f2 ();
70 f3 ();
71 if (v++ != 100)
72 __builtin_abort ();
73 f4 ();
74 return 0;