aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/used_types_4.f90
blob: b8dc488a2d4f80031eb0a500f59d063ae7f26b23 (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
! { dg-do compile }
! Tests the fix for PR28788, a regression in which an ICE was caused
! by the failure of derived type association for the arguments of
! InitRECFAST because the formal namespace derived types references
! were not being reassociated to the module.
!
! Contributed by Martin Reinecke  <martin@mpa-garching.mpg.de>  
! 
module Precision
  integer, parameter :: dl = KIND(1.d0)
end module Precision

module ModelParams
  use precision
  type CAMBparams
    real(dl)::omegab,h0,tcmb,yhe
  end type
  type (CAMBparams) :: CP
contains
  subroutine CAMBParams_Set(P)
    type(CAMBparams), intent(in) :: P
  end subroutine CAMBParams_Set
end module ModelParams

module TimeSteps
  use precision
  use ModelParams
end module TimeSteps

module ThermoData
  use TimeSteps
contains
  subroutine inithermo(taumin,taumax)
    use precision
    use ModelParams  ! Would ICE here
    real(dl) taumin,taumax
    call InitRECFAST(CP%omegab,CP%h0,CP%tcmb,CP%yhe)
  end subroutine inithermo
end module ThermoData