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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [used_types_7.f90] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Tests the fix for a further regression caused by the
3
! fix for PR28788 and posted as PR28908. The problem was
4
! caused by the patch preventing interface derived types
5
! from associating with identical derived types in the
6
! containing namespaces.
7
!
8
! Contributed by HJ Lu  
9
!
10
module bar
11
  implicit none
12
  public
13
  type ESMF_Time
14
    integer :: DD
15
  end type
16
end module bar
17
 
18
module foo
19
  use bar
20
  implicit none
21
  private
22
  type ESMF_Clock
23
    type(ESMF_Time)  :: CurrTime
24
  end type
25
  interface operator (+)
26
    function add (x, y)
27
      use bar
28
      type(ESMF_Time) :: add
29
      type(ESMF_Time), intent(in) :: x
30
      type(ESMF_Time), intent(in) :: y
31
    end function add
32
  end interface
33
contains
34
  subroutine ESMF_ClockAdvance(clock)
35
    type(ESMF_Clock), intent(inout) :: clock
36
    clock%CurrTime = clock%CurrTime + clock%CurrTime
37
  end subroutine ESMF_ClockAdvance
38
end module foo
39
! { dg-final { cleanup-modules "foo bar" } }

powered by: WebSVN 2.1.0

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