1! { dg-do compile }
2! Tests the fix for PR28788, a regression in which an ICE was caused
3! by the failure of derived type association for the arguments of
4! InitRECFAST because the formal namespace derived types references
5! were not being reassociated to the module.
6!
7! Contributed by Martin Reinecke  <martin@mpa-garching.mpg.de>
8!
9module Precision
10  integer, parameter :: dl = KIND(1.d0)
11end module Precision
12
13module ModelParams
14  use precision
15  type CAMBparams
16    real(dl)::omegab,h0,tcmb,yhe
17  end type
18  type (CAMBparams) :: CP
19contains
20  subroutine CAMBParams_Set(P)
21    type(CAMBparams), intent(in) :: P
22  end subroutine CAMBParams_Set
23end module ModelParams
24
25module TimeSteps
26  use precision
27  use ModelParams
28end module TimeSteps
29
30module ThermoData
31  use TimeSteps
32contains
33  subroutine inithermo(taumin,taumax)
34    use precision
35    use ModelParams  ! Would ICE here
36    real(dl) taumin,taumax
37    call InitRECFAST(CP%omegab,CP%h0,CP%tcmb,CP%yhe)
38  end subroutine inithermo
39end module ThermoData
40