Commit test case for PR 87644, which has fixed itself somehow.
authorThomas König <tkoenig@gcc.gnu.org>
Mon, 13 Apr 2020 17:06:41 +0000 (19:06 +0200)
committerThomas König <tkoenig@gcc.gnu.org>
Mon, 13 Apr 2020 17:06:41 +0000 (19:06 +0200)
2020-04-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/87644
* gfortran.dg/variable_parameter.f90: New test.

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/variable_parameter.f90 [new file with mode: 0644]

index 3c3352f5c8be39449cd2df5edbc5536b18714e04..d58c76b0db060b377371a1cf10eae41c95639fdf 100644 (file)
@@ -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 (file)
index 0000000..d653c30
--- /dev/null
@@ -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