1 /* { dg-do compile } */
3 /* Check that various cases of invalid references to variables bound
4 in an intervening code scope are diagnosed and do not ICE. This test
5 is expected to produce errors. */
8 extern void foo (T, T);
13 #pragma omp for collapse (2)
14 for (T i = 0; i < 64; i++)
17 for (T j = v; j < 64; j++) /* { dg-error "initializer is bound in intervening code" } */
25 #pragma omp for collapse (2)
26 for (T i = 0; i < 64; i++)
29 for (T j = 0; j < v; j++) /* { dg-error "end test is bound in intervening code" } */
37 #pragma omp for collapse (2)
38 for (T i = 0; i < 64; i++)
41 for (T j = 0; j < 64; j = j + v) /* { dg-error "increment expression is bound in intervening code" } */
49 #pragma omp for collapse (2)
50 for (T i = 0; i < 64; i++)
53 for (T j = v; j < 64; j++) /* { dg-error "initializer is bound in intervening code" } */
61 #pragma omp for collapse (2)
62 for (T i = 0; i < 64; i++)
65 for (j = 0; j < 64; j++) /* { dg-error "loop variable is bound in intervening code" } */
73 #pragma omp for collapse (2)
74 for (T i = 0; i < 64; i++)
79 for (j = v; j < 64; j++) /* { dg-error "loop variable is bound in intervening code" } */
80 /* { dg-error "initializer is bound in intervening code" "" { target *-*-* } .-1 } */