AVR: Assert minimal required bit width of section_common::flags.
[gcc.git] / libgomp / testsuite / libgomp.c / pr43893.c
blobb85e9242bb33cf11b3c891fa952dc4cc2fe4b0a6
1 /* PR c/43893 */
2 /* { dg-do run } */
4 extern void abort (void);
6 int
7 main ()
9 int c;
10 unsigned int i;
11 int j;
12 c = 0;
13 #pragma omp parallel for reduction(+:c)
14 for (i = 0; i < 1; i++)
15 c++;
16 if (c != 1)
17 abort ();
18 c = 0;
19 #pragma omp parallel for reduction(+:c)
20 for (i = 0; i <= 0; i++)
21 c++;
22 if (c != 1)
23 abort ();
24 c = 0;
25 #pragma omp parallel for reduction(+:c)
26 for (j = - __INT_MAX__ - 1; j < - __INT_MAX__; j++)
27 c++;
28 if (c != 1)
29 abort ();
30 c = 0;
31 #pragma omp parallel for reduction(+:c)
32 for (j = - __INT_MAX__ - 1; j <= - __INT_MAX__ - 1; j++)
33 c++;
34 if (c != 1)
35 abort ();
36 c = 0;
37 #pragma omp parallel for reduction(+:c)
38 for (i = 2U * __INT_MAX__ + 1; i > 2U * __INT_MAX__; i--)
39 c++;
40 if (c != 1)
41 abort ();
42 c = 0;
43 #pragma omp parallel for reduction(+:c)
44 for (i = 2U * __INT_MAX__ + 1; i >= 2U * __INT_MAX__ + 1; i--)
45 c++;
46 if (c != 1)
47 abort ();
48 c = 0;
49 #pragma omp parallel for reduction(+:c)
50 for (j = __INT_MAX__; j > __INT_MAX__ - 1; j--)
51 c++;
52 if (c != 1)
53 abort ();
54 c = 0;
55 #pragma omp parallel for reduction(+:c)
56 for (j = __INT_MAX__; j >= __INT_MAX__; j--)
57 c++;
58 if (c != 1)
59 abort ();
60 return 0;