RISC-V: Add support for riscv-*-*.
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_4.f90
blob7ede11fd0913218881545ddcf11d333a92a1927f
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 subroutine foo(n,x)
4 implicit none
5 integer, intent(in) :: n
6 complex(8), intent(out) :: x(n,*)
7 x(1,1) = 0.d0
8 x(n,1) = 0.d0
9 x(:,1) = 0.d0
10 x(2:,1) = 0.d0
11 x(:n-1,1) = 0.d0
12 x((/1,n/),1) = 0.d0
13 end subroutine foo
15 program test
16 implicit none
17 integer, parameter :: n = 17
18 complex(8) :: x(n,n)
19 call foo(n,x)
20 end program test