repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
ambiguous_specific_1.f90
blob
1097b9f3cbf4b5b108814335c317d2f16e726706
1
! { dg-do compile }
2
! Checks the fix for PR33542, in which the ambiguity in the specific
3
! interfaces of foo was missed.
4
!
5
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
6
!
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
17
18
MODULE
M2
19
INTERFACE
FOO
20
MODULE
PROCEDURE FOO
21
END INTERFACE
22
CONTAINS
23
SUBROUTINE
FOO
(
R
)
24
REAL
,
INTENT
(
IN
) ::
R
25
WRITE
(*,*)
'REAL'
26
END SUBROUTINE
FOO
27
END MODULE
M2
28
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
)
! { dg-error "is ambiguous" }
37
END PROGRAM
P