* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / argument_checking_18.f90
blob613a8a7495601e105bddf3a1dc772f0ac8ee7eb7
1 ! { dg-do compile }
3 ! PR 47349: missing warning: Actual argument contains too few elements
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 implicit none
8 type t
9 integer :: j(3)
10 end type t
12 type(t) :: tt
13 integer :: i(3) = (/ 1,2,3 /)
15 tt%j = i
17 call sub1 (i) ! { dg-error "Actual argument contains too few elements" }
18 call sub1 (tt%j) ! { dg-error "Actual argument contains too few elements" }
19 call sub2 (i) ! { dg-error "Rank mismatch in argument" }
20 call sub2 (tt%j) ! { dg-error "Rank mismatch in argument" }
22 contains
24 subroutine sub1(i)
25 integer, dimension(1:3,1:3) :: i
26 print *,"sub1:",i
27 end subroutine
29 subroutine sub2(i)
30 integer, dimension(:,:) :: i
31 print *,"sub2:",i
32 end subroutine
34 end