aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/used_types_9.f90
blob: 960b0c6b21e3c8a20744563047df91bf6a8b20de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
! { 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 domain_ptr
    type(domain), POINTER  :: ptr
  end type domain_ptr
  type domain
    TYPE(domain_ptr) , DIMENSION( : ) , POINTER         :: parents
    TYPE(domain_ptr) , DIMENSION( : ) , POINTER         :: nests
  end type domain
end module bar

module foo
contains
  recursive subroutine integrate (grid)
    use bar
    implicit none
    type(domain), POINTER  :: grid
    interface
      subroutine solve_interface (grid)
        use bar
        TYPE (domain) grid
      end subroutine solve_interface
    end interface
  end subroutine integrate
end module foo