PR modula2/117371: type incompatibility between INTEGER and CARDINAL
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / pr39495-2.c
blobc0b05cbe9b39182474093a2a75bd2ac3da280c3a
1 /* PR c/39495 */
2 /* { dg-do compile } */
3 /* { dg-options "-fopenmp" } */
5 #define INT_MIN (-__INT_MAX__ - 1)
6 #define INT_MAX __INT_MAX__
7 #define UINT_MAX (2U * __INT_MAX__ + 1)
9 int
10 foo (void)
12 int i;
13 unsigned int u;
15 #pragma omp for
16 for (i = INT_MIN + 6; i != INT_MIN; i--)
18 #pragma omp for
19 for (i = INT_MIN + 6; i == INT_MIN; i--) /* { dg-error "invalid controlling predicate" } */
21 #pragma omp for
22 for (i = INT_MAX - 6; i != INT_MAX; i++)
24 #pragma omp for
25 for (i = INT_MAX - 6; i == INT_MAX; i++) /* { dg-error "invalid controlling predicate" } */
27 #pragma omp for
28 for (u = 6; u != 0; u--)
30 #pragma omp for
31 for (u = 6; u == 0; u--) /* { dg-error "invalid controlling predicate" } */
33 #pragma omp for
34 for (u = UINT_MAX - 6; u != UINT_MAX; u++)
36 #pragma omp for
37 for (u = UINT_MAX - 6; u == UINT_MAX; u++) /* { dg-error "invalid controlling predicate" } */