diff options
author | Thomas König <tkoenig@gcc.gnu.org> | 2020-04-13 19:06:41 +0200 |
---|---|---|
committer | Thomas König <tkoenig@gcc.gnu.org> | 2020-04-13 19:06:41 +0200 |
commit | ec72bb0c48cfbd8b9812a6df1049fbcbad472e15 (patch) | |
tree | f716ead6e03ae1cab41c3ac30afa2bdd911806b3 | |
parent | efbf7392079222ef00db2d39998faf5513055181 (diff) | |
download | gcc-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/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/variable_parameter.f90 | 22 |
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 |