aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas König <tkoenig@gcc.gnu.org>2020-04-13 19:06:41 +0200
committerThomas König <tkoenig@gcc.gnu.org>2020-04-13 19:06:41 +0200
commitec72bb0c48cfbd8b9812a6df1049fbcbad472e15 (patch)
treef716ead6e03ae1cab41c3ac30afa2bdd911806b3
parentefbf7392079222ef00db2d39998faf5513055181 (diff)
downloadgcc-ec72bb0c48cfbd8b9812a6df1049fbcbad472e15.zip
gcc-ec72bb0c48cfbd8b9812a6df1049fbcbad472e15.tar.gz
gcc-ec72bb0c48cfbd8b9812a6df1049fbcbad472e15.tar.bz2
Commit test case for PR 87644, which has fixed itself somehow.
2020-04-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/87644 * gfortran.dg/variable_parameter.f90: New test.
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/variable_parameter.f9022
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3c3352f..d58c76b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-13 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/87644
+ * gfortran.dg/variable_parameter.f90: New test.
+
2020-04-13 Linus Koenig <link@sig-st.de>
PR fortran/94192
diff --git a/gcc/testsuite/gfortran.dg/variable_parameter.f90 b/gcc/testsuite/gfortran.dg/variable_parameter.f90
new file mode 100644
index 0000000..d653c30
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/variable_parameter.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! PR 87644 - this used to cause an ICE.
+! Test case by Matt Thompson.
+module test
+
+ implicit none
+ private
+ public :: get
+
+contains
+
+ subroutine initialize()
+ integer :: parameters
+ parameters = get()
+ end subroutine initialize
+
+ function get() result(parameters)
+ integer :: parameters
+ parameters = 1
+ end function get
+
+end module test