+2019-10-13 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/92017
+ * expr.c (simplify_parameter_variable): Set the character length
+ of the result expression from the original expression if
+ necessary.
+
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91649
e->rank = p->rank;
+ if (e->ts.type == BT_CHARACTER && e->ts.u.cl == NULL)
+ e->ts.u.cl = gfc_new_charlen (gfc_current_ns, p->ts.u.cl);
+
/* Do not copy subobject refs for constant. */
if (e->expr_type != EXPR_CONSTANT && p->ref != NULL)
e->ref = gfc_copy_ref (p->ref);
+2019-10-13 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/92017
+ * gfortran.dg/minmaxloc_14.f90: New test.
+
2019-10-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/target-supports.exp (add_options_for_c99_runtime): Remove.
--- /dev/null
+! { dg-do compile }
+! PR 92017 - this used to cause an ICE due do a missing charlen.
+! Original test case by Gerhard Steinmetz.
+
+program p
+ character(3), parameter :: a(4) = 'abc'
+ integer, parameter :: b(1) = minloc(a)
+ integer, parameter :: c = minloc(a, dim=1)
+ integer, parameter :: bb(1) = maxloc(a)
+ integer, parameter :: c2 = maxloc(a,dim=1)
+end program p
+