OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / host_used_types_1.f90
1 ! { dg-do compile }
2 ! Tests the fix for PR25532, which was a regression introduced by
3 ! the fix for PR20244.
4 !
5 ! Contributed by Erik Edelmann  <eedelman@gcc.gnu.org>
6 module ModelParams
7         implicit none
8
9         type ReionizationParams
10              real   :: fraction
11         end type ReionizationParams
12
13         type CAMBparams
14              type(ReionizationParams) :: Reion
15          end type CAMBparams
16
17         type(CAMBparams) CP
18 end module ModelParams
19
20
21 module ThermoData
22     use ModelParams
23     implicit none
24
25 contains
26
27     subroutine inithermo()
28         use ModelParams
29         if (0 < CP%Reion%fraction) then
30         end if
31     end subroutine inithermo
32
33 ! The bug expressed itself in this subroutine because the component type
34 ! information was not being copied from the parent namespace.
35     subroutine SetTimeSteps
36         if (0 < CP%Reion%fraction) then
37         end if
38     end subroutine SetTimeSteps
39
40 end module ThermoData
41
42 ! { dg-final { cleanup-modules "ModelParams ThermoData" } }