2 ! { dg-additional-options "-Wdo-subscript" }
4 real, dimension(3) :: a
6 do i
=-1,3 ! { dg-warning "out of bounds \\(-1 < 1\\)" }
9 a(i
) = -234 ! { dg-warning "out of bounds \\(-1 < 1\\)" }
13 a(i
) = a(i
)*2 ! No warning - end value is 3
15 do i
=1,4 ! { dg-warning "out of bounds \\(4 > 3\\)" }
17 a(i
) = 33 ! { dg-warning "out of bounds \\(4 > 3\\)" }
19 do i
=0,3 ! { dg-warning "out of bounds \\(0 < 1\\)" }
21 a(i
) = -21. ! { dg-warning "out of bounds \\(0 < 1\\)" }