aarch64: Add missing ACLE macro for NEON-SVE Bridge
[official-gcc.git] / gcc / testsuite / gfortran.dg / argument_checking_3.f90
blob4498957270c71c25742cc790ba46ed0dd29edb65
1 ! { dg-do compile }
3 ! PR fortran/30940
4 program test
5 implicit none
6 interface
7 subroutine foo(a)
8 character(len=1),dimension(:) :: a
9 end subroutine foo
10 subroutine bar(a)
11 character(len=1),dimension(:,:) :: a
12 end subroutine bar
13 subroutine foobar(a)
14 character(len=1),dimension(4) :: a
15 end subroutine foobar
16 subroutine arr(a)
17 character(len=1),dimension(1,2,1,2) :: a
18 end subroutine arr
19 end interface
20 character(len=2) :: len2
21 character(len=4) :: len4
22 len2 = '12'
23 len4 = '1234'
25 call foo(len2) ! { dg-error "Rank mismatch in argument" }
26 call foo("ca") ! { dg-error "Rank mismatch in argument" }
27 call bar("ca") ! { dg-error "Rank mismatch in argument" }
28 call foobar(len2) ! { dg-error "contains too few elements" }
29 call foobar(len4)
30 call foobar("bar") ! { dg-error "contains too few elements" }
31 call foobar("bar33")
32 call arr(len2) ! { dg-error "contains too few elements" }
33 call arr(len4)
34 call arr("bar") ! { dg-error "contains too few elements" }
35 call arr("bar33")
36 end program test