PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_7.f90
blob53f1753bdc7433f5cd40e94ee975dbcb45cc08bc
1 ! { dg-do compile }
2 ! Tests the fix for PR29652, in which ambiguous interfaces were not detected
3 ! with more than two specific procedures in the interface.
5 ! Contributed by Daniel Franke <franke.daniel@gmail.com>
7 MODULE global
8 INTERFACE iface
9 MODULE PROCEDURE sub_a
10 MODULE PROCEDURE sub_b
11 MODULE PROCEDURE sub_c
12 END INTERFACE
13 CONTAINS
14 SUBROUTINE sub_a(x) ! { dg-error "Ambiguous interfaces" }
15 INTEGER, INTENT(in) :: x
16 WRITE (*,*) 'A: ', x
17 END SUBROUTINE
18 SUBROUTINE sub_b(y) ! { dg-error "Ambiguous interfaces" }
19 INTEGER, INTENT(in) :: y
20 WRITE (*,*) 'B: ', y
21 END SUBROUTINE
22 SUBROUTINE sub_c(x, y)
23 REAL, INTENT(in) :: x, y
24 WRITE(*,*) x, y
25 END SUBROUTINE
26 END MODULE