From d3f2a5582979e66a6f198561786d6b573175163f Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Fri, 14 Mar 2008 03:13:17 +0000 Subject: re PR fortran/35475 (gfortran fails to compile valid code with ICE erro in fold-const.c) 2008-03-13 Jerry DeLisle PR fortran/35475 * gfortran.dg/derived_sub.f90: New test. From-SVN: r133205 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/derived_sub.f90 | 33 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/derived_sub.f90 (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 919025d..7ae9de1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-03-13 Jerry DeLisle + + PR fortran/35475 + * gfortran.dg/derived_sub.f90: New test. + 2008-03-13 H.J. Lu PR testsuite/35558 diff --git a/gcc/testsuite/gfortran.dg/derived_sub.f90 b/gcc/testsuite/gfortran.dg/derived_sub.f90 new file mode 100644 index 0000000..1750ada --- /dev/null +++ b/gcc/testsuite/gfortran.dg/derived_sub.f90 @@ -0,0 +1,33 @@ +! { dg-do compile } +! PR35475 gfortran fails to compile valid code with ICE error in fold-const.c +! Test case from PR report added to avoid future regression +module modone + type mytype + real :: myvar + end type +end module + +module modtwo + interface + subroutine subone(mytype_cur) + use modone + type (mytype) mytype_cur + end subroutine + end interface + +contains + + subroutine subtwo(mytype_cur) + use modone + type (mytype) mytype_cur,mytype_fin + mytype_fin=mytype_cur + return + end subroutine + + subroutine subthree(mytype_cur) + use modone + type (mytype) mytype_cur + call subone(mytype_cur) + end subroutine + +end module -- cgit v1.1