2 ! { dg-options "-fbounds-check" }
3 ! Tests the fix for PR30003, in which the 'end' of an array section
4 ! would not be evaluated at all if it was on the lhs of an assignment
5 ! or would be evaluated many times if bound checking were on.
7 ! Contributed by Erik Edelmann <eedelmann@gcc.gnu.org>
10 integer :: a(5), b(3), cnt
13 ! Check the lhs references
23 ! Check the rhs references
31 a(1:3) = b(1:3:bar(1))
34 integer function bar(n
)
35 integer, intent(in
) :: n