From 8b4e5e711d9b2b979dcee445498a7f570ea49e2e Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Wed, 2 Oct 2019 17:01:30 +0000 Subject: re PR fortran/91943 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370) 2019-10-02 Steven G. Kargl PR fortran/91943 * match.c (gfc_match_call): BOZ cannot be an actual argument in a subroutine reference. * resolve.c (resolve_function): BOZ cannot be an actual argument in a function reference. 2019-10-02 Steven G. Kargl PR fortran/91943 gfortran.dg/pr91943.f90 From-SVN: r276471 --- gcc/fortran/resolve.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index e8d0566..a792547 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -3242,6 +3242,21 @@ resolve_function (gfc_expr *expr) if (expr->expr_type != EXPR_FUNCTION) return t; + /* Walk the argument list looking for invalid BOZ. */ + if (expr->value.function.esym) + { + gfc_actual_arglist *a; + + for (a = expr->value.function.actual; a; a = a->next) + if (a->expr && a->expr->ts.type == BT_BOZ) + { + gfc_error ("A BOZ literal constant at %L cannot appear as an " + "actual argument in a function reference", + &a->expr->where); + return false; + } + } + temp = need_full_assumed_size; need_full_assumed_size = 0; -- cgit v1.1