aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2008-03-14 03:13:17 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2008-03-14 03:13:17 +0000
commitd3f2a5582979e66a6f198561786d6b573175163f (patch)
treeffd3478b13077049a769bf1e00261c23481f95e6 /gcc
parentaf078a600395f715a3221154aec8299652f76046 (diff)
downloadgcc-d3f2a5582979e66a6f198561786d6b573175163f.zip
gcc-d3f2a5582979e66a6f198561786d6b573175163f.tar.gz
gcc-d3f2a5582979e66a6f198561786d6b573175163f.tar.bz2
re PR fortran/35475 (gfortran fails to compile valid code with ICE erro in fold-const.c)
2008-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/35475 * gfortran.dg/derived_sub.f90: New test. From-SVN: r133205
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/derived_sub.f9033
2 files changed, 38 insertions, 0 deletions
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 <jvdelisle@gcc.gnu.org>
+
+ PR fortran/35475
+ * gfortran.dg/derived_sub.f90: New test.
+
2008-03-13 H.J. Lu <hongjiu.lu@intel.com>
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