2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / argument_checking_4.f90
blob702b37a20e5e2317f4e27546b37f7f6ff1e17fe2
1 ! { dg-do compile }
3 ! PR fortran/30940
4 program test
5 implicit none
6 interface
7 subroutine foobar(a)
8 character(len=1),dimension(4) :: a
9 end subroutine foobar
10 subroutine arr(a)
11 character(len=1),dimension(1,2,1,2) :: a
12 end subroutine arr
13 end interface
15 call foobar( [ "bar" ]) ! { dg-error "contains too few elements" }
16 call foobar( ["ba ","r33"])
17 call arr( [ "bar" ]) ! { dg-error "contains too few elements" }
18 call arr( reshape(["b","a","r","3"], [2,2]))
19 call arr( reshape(["b","a"], [1,2])) ! { dg-error "contains too few elements" }
20 call arr( reshape(["b","a"], [2,1])) ! { dg-error "contains too few elements" }
21 end program test