diff options
author | Ben Cheng <bccheng@google.com> | 2014-03-25 22:37:19 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2014-03-25 22:37:19 -0700 |
commit | 1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch) | |
tree | c607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90 | |
parent | 283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff) | |
download | toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2 toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip |
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90 new file mode 100644 index 000000000..0dfd9d1ec --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gfortran.dg/host_used_types_1.f90 @@ -0,0 +1,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 |