comparison gcc/testsuite/gfortran.dg/do_subscript_3.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 ! { dg-do compile }
2 ! PR fortran/91424
3 ! Check that only one warning is issued inside blocks, and that
4 ! warnings are also issued for contained subroutines.
5
6 program main
7 real :: a(5)
8 block
9 integer :: j
10 do j=0, 5 ! { dg-warning "out of bounds" }
11 a(j) = 2. ! { dg-warning "out of bounds" }
12 end do
13 end block
14 call x
15 contains
16 subroutine x
17 integer :: i
18 do i=1,6 ! { dg-warning "out of bounds" }
19 a(i) = 2. ! { dg-warning "out of bounds" }
20 end do
21 end subroutine x
22 end program main