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. */
7 extern void foo (int, int);
11 #pragma omp for collapse (2)
12 for (int i
= 0; i
< 64; i
++)
15 for (int j
= v
; j
< 64; j
++) /* { dg-error "initializer is bound in intervening code" } */
22 #pragma omp for collapse (2)
23 for (int i
= 0; i
< 64; i
++)
26 for (int j
= 0; j
< v
; j
++) /* { dg-error "end test is bound in intervening code" } */
33 #pragma omp for collapse (2)
34 for (int i
= 0; i
< 64; i
++)
37 for (int j
= 0; j
< 64; j
= j
+ v
) /* { dg-error "increment expression is bound in intervening code" } */
44 #pragma omp for collapse (2)
45 for (int i
= 0; i
< 64; i
++)
48 for (int j
= v
; j
< 64; j
++) /* { dg-error "initializer is bound in intervening code" } */
55 #pragma omp for collapse (2)
56 for (int i
= 0; i
< 64; i
++)
59 for (j
= 0; j
< 64; j
++) /* { dg-error "loop variable is bound in intervening code" } */
66 #pragma omp for collapse (2)
67 for (int i
= 0; i
< 64; i
++)
72 for (j
= v
; j
< 64; j
++) /* { dg-error "loop variable is bound in intervening code" } */
73 /* { dg-error "initializer is bound in intervening code" "" { target *-*-* } .-1 } */