aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90
blob: 0dfd9d1ecd985f00cd44a987da0e7e1ec847a12a (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
36
37
38
39
40
! { dg-do compile }
! Tests the fix for PR25532, which was a regression introduced by
! the fix for PR20244.
!
! Contributed by Erik Edelmann  <eedelman@gcc.gnu.org>
module ModelParams
        implicit none

        type ReionizationParams
             real   :: fraction
        end type ReionizationParams

        type CAMBparams
             type(ReionizationParams) :: Reion
         end type CAMBparams

        type(CAMBparams) CP
end module ModelParams


module ThermoData
    use ModelParams
    implicit none

contains

    subroutine inithermo()
        use ModelParams
        if (0 < CP%Reion%fraction) then
        end if
    end subroutine inithermo

! The bug expressed itself in this subroutine because the component type
! information was not being copied from the parent namespace.
    subroutine SetTimeSteps
        if (0 < CP%Reion%fraction) then
        end if
    end subroutine SetTimeSteps

end module ThermoData