From ec72bb0c48cfbd8b9812a6df1049fbcbad472e15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20K=C3=B6nig?= Date: Mon, 13 Apr 2020 19:06:41 +0200 Subject: [PATCH] Commit test case for PR 87644, which has fixed itself somehow. 2020-04-13 Thomas Koenig PR fortran/87644 * gfortran.dg/variable_parameter.f90: New test. --- gcc/testsuite/ChangeLog | 5 +++++ .../gfortran.dg/variable_parameter.f90 | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/variable_parameter.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3c3352f5c8b..d58c76b0db0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-13 Thomas Koenig + + PR fortran/87644 + * gfortran.dg/variable_parameter.f90: New test. + 2020-04-13 Linus Koenig 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 00000000000..d653c30562f --- /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 -- 2.30.2