Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_1.f90
blobe170f870e1a4a39a31e3bc62b7b9b260b5430cf8
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
29 interface ambiguous
30 module procedure f ! { dg-warning "in generic interface" "" }
31 end interface
33 contains
35 real function f(a)
36 real a
37 f = a
38 end function
40 end module z
42 ! { dg-final { cleanup-modules "y z" } }