https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61454
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |fxcoudert at gcc dot gnu.org --- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- In expr.c:scalarize_intrinsic_call(), we don't deal correctly with intrinsics that have an optional kind argument. I'm testing this simple patch to fix it: Index: expr.c =================================================================== --- expr.c (revision 211685) +++ expr.c (working copy) @@ -1955,7 +1955,7 @@ scalarize_intrinsic_call (gfc_expr *e) for (; a; a = a->next) { n++; - if (a->expr->expr_type != EXPR_ARRAY) + if (!a->expr || a->expr->expr_type != EXPR_ARRAY) continue; array_arg = n; expr = gfc_copy_expr (a->expr);