OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [ambiguous_specific_1.f90] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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 
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
38
! { dg-final { cleanup-modules "m1 m2" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.