1! { dg-do run }
2! { dg-options "-fbounds-check" }
3subroutine 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
13end subroutine foo
14
15program test
16  implicit none
17  integer, parameter :: n = 17
18  complex(8) :: x(n,n)
19  call foo(n,x)
20end program test
21