Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 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> | |
5 | |
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 | |
13 | |
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 |