aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2005-12-29 06:11:21 +0000
committerPaul Thomas <pault@gcc.gnu.org>2005-12-29 06:11:21 +0000
commit486fd3c90cedb06ebe160362a9e98d1166604b9c (patch)
treef48093f6a7494da506dda25e6dfbab2cf3e92673 /gcc/testsuite
parentb69542f7705b3d216fe85c5562fc4e81a5d90e58 (diff)
downloadgcc-486fd3c90cedb06ebe160362a9e98d1166604b9c.zip
gcc-486fd3c90cedb06ebe160362a9e98d1166604b9c.tar.gz
gcc-486fd3c90cedb06ebe160362a9e98d1166604b9c.tar.bz2
re PR fortran/25532 (ICE in gfc_conv_component_ref, at fortran/trans-expr.c:269)
2005-12-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/25532 * trans-types.c (copy_dt_decls_ifequal): Copy declarations for components of derived type components by recursing into gfc_get_derived_type. 2005-12-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/25532 *gfortran.dg/host_used_types_1.f90: Check that host associated derived type components of derived types are properly declared in contained procedures. From-SVN: r109138
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gfortran.dg/host_used_types_1.f9040
2 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d3fc200..c92d878 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-29 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/25532
+ *gfortran.dg/host_used_types_1.f90: New test. Check that host
+ associated derived type components of derived types are
+ properly declared in contained procedures.
+
2005-12-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25139
diff --git a/gcc/testsuite/gfortran.dg/host_used_types_1.f90 b/gcc/testsuite/gfortran.dg/host_used_types_1.f90
new file mode 100644
index 0000000..89da583
--- /dev/null
+++ b/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 \ No newline at end of file