* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / assumed_shape_ranks_1.f90
bloba1c549bed8d70ce229a0ee4734d6c60f18ea3b2a
1 ! { dg-do compile }
2 ! Tests fix for PR25070; was no error for actual and assumed shape
3 ! dummy ranks not matching.
4 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
6 module addon
7 interface extra
8 function foo (y)
9 integer :: foo (2), y (:)
10 end function foo
11 end interface extra
12 end module addon
14 use addon
15 INTEGER :: I(2,2)
16 I=RESHAPE((/1,2,3,4/),(/2,2/))
17 CALL TST(I) ! { dg-error "Rank mismatch in argument" }
18 i = foo (i) ! { dg-error "Rank mismatch|Incompatible ranks" }
19 CONTAINS
20 SUBROUTINE TST(I)
21 INTEGER :: I(:)
22 write(6,*) I
23 END SUBROUTINE TST
24 END