URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [used_types_8.f90] - Rev 165
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }
! Tests the fix for a further regression caused by the
! fix for PR28788 and posted as PR28908. The problem was
! caused by the patch preventing interface derived types
! from associating with identical derived types in the
! containing namespaces.
!
! Contributed by HJ Lu <hjl@lucon.org>
!
module bar
implicit none
public
type ESMF_Time
sequence
integer :: MM
end type
public operator (+)
private add
interface operator (+)
module procedure add
end interface
contains
function add (x, y)
type(ESMF_Time) :: add
type(ESMF_Time), intent(in) :: x
type(ESMF_Time), intent(in) :: y
add = x
end function add
end module bar
module foo
use bar
implicit none
private
type ESMF_Clock
sequence
type(ESMF_Time) :: CurrTime
end type
contains
subroutine ESMF_ClockAdvance(clock)
use bar
type(ESMF_Clock), intent(inout) :: clock
clock%CurrTime = clock%CurrTime + clock%CurrTime
end subroutine ESMF_ClockAdvance
end module foo
! { dg-final { cleanup-modules "foo bar" } }
Go to most recent revision | Compare with Previous | Blame | View Log