2 ! { dg-options "-Wall" }
4 ! DO-loop compile-time checks
9 do i
= 1, 0 ! { dg-warning "executed zero times" }
12 do i
= 1, -1, 1 ! { dg-warning "executed zero times" }
15 do i
= 1, 2, -1 ! { dg-warning "executed zero times" }
18 do i
= 1, 2, 0 ! { dg-error "cannot be zero" }
21 do r
= 1, 0 ! { dg-warning "must be integer|executed zero times" }
24 do r
= 1, -1, 1 ! { dg-warning "must be integer|executed zero times" }
27 do r
= 1, 2, -1 ! { dg-warning "must be integer|executed zero times" }
32 ! { dg-warning "must be integer" "loop var" { target *-*-* } 30 }
33 ! { dg-error "cannot be zero" "loop step" { target *-*-* } 30 }