OSDN Git Service

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