]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR fortran/91783 (ICE in gfc_dep_resolver, at fortran/dependency.c:2111)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sat, 30 Nov 2019 15:08:32 +0000 (15:08 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sat, 30 Nov 2019 15:08:32 +0000 (15:08 +0000)
Backport from trunk as an insurance policy.

2019-11-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/91783
    * gfortran.dg/dependency_56.f90: New test. Backport from trunk on
    the off-chance that somebody backports something that will break
    this test case.

From-SVN: r278874

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

index 671ff2887a30ccd98135a90f86d1685719a996f1..8a392e08b66999fa16e8e55ce6b07e185f924d84 100644 (file)
@@ -1,3 +1,11 @@
+
+2019-11-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/91783
+       * gfortran.dg/dependency_56.f90: New test. Backport from trunk on
+       the off-chance that somebody backports something that will break
+       this test case.
+
 2019-11-29  Harald Anlauf  <anlauf@gmx.de>
 
        Backport from mainline
diff --git a/gcc/testsuite/gfortran.dg/dependency_56.f90 b/gcc/testsuite/gfortran.dg/dependency_56.f90
new file mode 100644 (file)
index 0000000..97c0c81
--- /dev/null
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! PR 91783 - used to cause an ICE in dependency checking.
+! Test case by Gerhard Steinmetz.
+program p
+   class(*), allocatable :: a(:)
+   a = [1, 2, 3]
+   a = f(a)
+contains
+   function f(x) result(y)
+      class(*), allocatable, intent(in) :: x(:)
+      class(*), allocatable :: y(:)
+      y = x
+   end
+end