* Mainline merge as of 2006-02-16 (@111136).
[official-gcc.git] / gcc / testsuite / gfortran.dg / assumed_shape_ranks_1.f90
bloba7f24ea1bc541b0f4f8d62f63af9ded110a2c78f
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 "Type/rank mismatch in argument" }
18 i = foo (i) ! { dg-error "Type/rank mismatch|Incompatible ranks" }
19 CONTAINS
20 SUBROUTINE TST(I)
21 INTEGER :: I(:)
22 write(6,*) I
23 END SUBROUTINE TST
24 END