re PR fortran/91661 (ICE in gfc_conv_intrinsic_dot_product, at fortran/trans-intrinsi...
authorHarald Anlauf <anlauf@gmx.de>
Sat, 21 Dec 2019 20:42:14 +0000 (20:42 +0000)
committerHarald Anlauf <anlauf@gcc.gnu.org>
Sat, 21 Dec 2019 20:42:14 +0000 (20:42 +0000)
2019-12-21  Harald Anlauf  <anlauf@gmx.de>

PR fortran/91661
* gfortran.dg/pr91661.f90: New test.

From-SVN: r279699

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

index 0068dc0cf20e2f2e214b1f4a30fb2c531aac71bc..bbd9131e5cd8ffcb536d369c8d854d42f5dd1c6b 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-21  Harald Anlauf  <anlauf@gmx.de>
+
+       PR fortran/91661
+       * gfortran.dg/pr91661.f90: New test.
+
 2019-12-21  Harald Anlauf  <anlauf@gmx.de>
 
        PR fortran/92990
diff --git a/gcc/testsuite/gfortran.dg/pr91661.f90 b/gcc/testsuite/gfortran.dg/pr91661.f90
new file mode 100644 (file)
index 0000000..9a17675
--- /dev/null
@@ -0,0 +1,13 @@
+! { dg-do run }
+! PR fortran/91661
+! Contributed by Gerhard Steinmetz
+! Verify that fix for PR92996 also fixes this one
+program p
+  integer, parameter :: a(2)    = 2
+  integer, parameter :: b(a(1)) = 3
+  integer, parameter :: c       = dot_product(b, b)
+  integer, parameter :: d(a(1)+a(2)) = 3
+  integer, parameter :: e = size (d,dim=1)
+  if (c /= 18) stop 1   ! This used to ICE
+  if (e /= 4)  stop 2   ! This used to ICE
+end