Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / interface_7.f90
blob9f59b49721461ffce92e80947b930f39b43d5774
1 ! { dg-do compile }
2 ! One of the tests of the patch for PR30068.
3 ! Taken from the fortran 2003 standard C11.2.
5 ! The interface is invalid although it is unambiguous because the
6 ! standard explicitly does not require recursion into the formal
7 ! arguments of procedures that themselves are interface arguments.
9 module xx
10 INTERFACE BAD9
11 SUBROUTINE S9A(X)
12 REAL :: X
13 END SUBROUTINE S9A
14 SUBROUTINE S9B(X)
15 INTERFACE
16 FUNCTION X(A)
17 REAL :: X,A
18 END FUNCTION X
19 END INTERFACE
20 END SUBROUTINE S9B
21 SUBROUTINE S9C(X)
22 INTERFACE
23 FUNCTION X(A)
24 REAL :: X
25 INTEGER :: A
26 END FUNCTION X
27 END INTERFACE
28 END SUBROUTINE S9C ! { dg-error "Ambiguous interfaces" }
29 END INTERFACE BAD9
30 end module xx
32 ! { dg-final { cleanup-modules "xx" } }