PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_1.f90
blobc6598589f8e969b5d314d73afbbc0f4300d5d6e4
1 ! { dg-do compile }
2 ! This program would segfault without the patch for PR fortran/24005.
3 module y
5 ! If private statement is removed, then we get a bunch of errors
7 private f
9 ! If we rename 'f' in module y to say 'g', then gfortran correctly
10 ! identifies ambiguous as being ambiguous.
12 interface ambiguous
13 module procedure f
14 end interface
16 contains
18 real function f(a)
19 real a
20 f = a
21 end function
23 end module y
25 module z
27 use y ! { dg-warning "in generic interface" }
29 interface ambiguous
30 module procedure f
31 end interface
33 contains
35 real function f(a) ! { dg-warning "in generic interface" }
36 real a
37 f = a
38 end function
40 end module z