Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/generic_7.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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. | |
4 ! | |
5 ! Contributed by Daniel Franke <franke.daniel@gmail.com> | |
6 ! | |
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 |