Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_6.f90
blob2e7f85afa477de36299987ce97bec550c4e23e03
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 standard specifies that the optional arguments should be
6 ! ignored in the counting of like type/kind, so the specific
7 ! procedures below are invalid, even though actually unambiguous.
9 INTERFACE BAD8
10 SUBROUTINE S8A(X,Y,Z)
11 REAL,OPTIONAL :: X
12 INTEGER :: Y
13 REAL :: Z
14 END SUBROUTINE S8A
15 SUBROUTINE S8B(X,Z,Y)
16 INTEGER,OPTIONAL :: X
17 INTEGER :: Z
18 REAL :: Y
19 END SUBROUTINE S8B ! { dg-error "Ambiguous interfaces" }
20 END INTERFACE BAD8
21 real :: a, b
22 integer :: i, j
23 call bad8(x,i,b)
24 end