gcc/fortran/ChangeLog:
PR fortran/103473
* simplify.c (simplify_minmaxloc_nodim): Avoid NULL pointer
dereference when shape is not set.
gcc/testsuite/ChangeLog:
PR fortran/103473
* gfortran.dg/minmaxloc_15.f90: New test.
&& !mask->value.logical)
goto finish;
+ if (array->shape == NULL)
+ goto finish;
+
for (i = 0; i < array->rank; i++)
{
count[i] = 0;
--- /dev/null
+! { dg-do compile }
+! PR fortran/103473 - ICE in simplify_minmaxloc_nodim
+! Test case by Gerhard Steinmetz.
+
+subroutine s
+ implicit none
+ integer, parameter :: a(+'1') = [1] ! { dg-error "unary numeric operator" }
+ print *, minloc (a)
+end
+
+! { dg-prune-output "Parameter array" }