2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / ambiguous_specific_2.f90
blob4597b3c8630375cbc2338b2cc395020d9de98ec3
1 ! { dg-do compile }
2 ! Checks the fix for PR33542 does not throw an error if there is no
3 ! ambiguity in the specific interfaces of foo.
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7 MODULE M1
8 INTERFACE FOO
9 MODULE PROCEDURE FOO
10 END INTERFACE
11 CONTAINS
12 SUBROUTINE FOO(I)
13 INTEGER, INTENT(IN) :: I
14 WRITE(*,*) 'INTEGER'
15 END SUBROUTINE FOO
16 END MODULE M1
18 MODULE M2
19 INTERFACE FOO
20 MODULE PROCEDURE FOOFOO
21 END INTERFACE
22 CONTAINS
23 SUBROUTINE FOOFOO(R)
24 REAL, INTENT(IN) :: R
25 WRITE(*,*) 'REAL'
26 END SUBROUTINE FOOFOO
27 END MODULE M2
29 PROGRAM P
30 USE M1
31 USE M2
32 implicit none
33 external bar
34 CALL FOO(10)
35 CALL FOO(10.)
36 call bar (foo)
37 END PROGRAM P
39 SUBROUTINE bar (arg)
40 EXTERNAL arg
41 END SUBROUTINE bar
42 ! { dg-final { cleanup-modules "m1 m2" } }