RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_2.f
blob671f7f2410360d1de03afe97abfb7847434dfc24
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! PR fortran/19777
4 implicit none
5 integer npts
6 parameter (npts=10)
7 double precision v(npts)
8 double precision w(npts,npts,npts)
9 external init1
10 external init2
12 call init1 (npts, v)
13 call init2 (npts, w)
14 end
16 subroutine init1 (npts, v)
17 implicit none
18 integer npts
19 double precision v(*)
21 integer i
23 do 10 i = 1, npts
24 v(i) = 0
25 10 continue
26 end
28 subroutine init2 (npts, w)
29 implicit none
30 integer npts
31 double precision w(npts,npts,*)
33 integer i
35 do 20 i = 1, npts
36 w(i,1,1) = 0
37 w(1,npts,i) = 0
38 20 continue
39 end