AVR: Assert minimal required bit width of section_common::flags.
[gcc.git] / libgomp / testsuite / libgomp.c / pr70680-2.c
blob0aada78f0c5dea4301c2cca46d2b0e94c6f8d328
1 /* PR middle-end/70680 */
3 int v;
5 void
6 f1 (void)
8 int i = 0, j = 0;
9 #pragma omp task default(shared) if(0)
11 #pragma omp simd collapse(2)
12 for (i = 0; i < 10; i++)
13 for (j = 0; j < 10; j++)
15 v = i + j;
17 if (i != 10 || j != 10)
18 __builtin_abort ();
21 void
22 f2 (void)
24 int i = 0, j = 0;
25 #pragma omp task default(shared) if(0)
27 #pragma omp simd collapse(2)
28 for (i = 0; i < 10; i++)
29 for (j = 0; j < 10; j++)
32 if (i != 10 || j != 10)
33 __builtin_abort ();
36 void
37 f3 (void)
39 int i = 0, j = 0;
40 #pragma omp task default(shared) if(0)
42 #pragma omp simd collapse(2) lastprivate (i, j)
43 for (i = 0; i < 10; i++)
44 for (j = 0; j < 10; j++)
46 v = i + j;
48 if (i != 10 || j != 10)
49 __builtin_abort ();
52 void
53 f4 (void)
55 int i = 0, j = 0;
56 #pragma omp task default(shared) if(0)
58 #pragma omp simd collapse(2) lastprivate (i, j)
59 for (i = 0; i < 10; i++)
60 for (j = 0; j < 10; j++)
63 if (i != 10 || j != 10)
64 __builtin_abort ();
67 int
68 main ()
70 f1 ();
71 if (v++ != 20)
72 __builtin_abort ();
73 f2 ();
74 f3 ();
75 if (v++ != 20)
76 __builtin_abort ();
77 f4 ();
78 return 0;