# [commited] PR91661 - ICE in gfc_conv_intrinsic_dot_product, at fortran/trans-intrinsic.c:4804

Message ID trinity-b3e9b2d5-5236-44a8-9ad0-55d9085570b8-1576961625237@3c-app-gmx-bap46 New show [commited] PR91661 - ICE in gfc_conv_intrinsic_dot_product, at fortran/trans-intrinsic.c:4804 show

## Commit Message

Harald Anlauf Dec. 21, 2019, 8:53 p.m.
```A "side-effect" of Tobias Burnus' fix for PR92996, which addressed simplification
of some array-valued constant expression, is that it fixes the ICE in the subject.

To make sure that we do not regress I committed the testcase below as rev.279699.
This was OKed in the PR by Thomas König.

Thanks,
Harald

2019-12-21  Harald Anlauf  <anlauf@gmx.de>

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

## Patch

```Index: gcc/testsuite/gfortran.dg/pr91661.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr91661.f90       (nicht existent)
+++ gcc/testsuite/gfortran.dg/pr91661.f90       (Arbeitskopie)
@@ -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

```