From 866664a3813a97fda8c7b6ebdd32d10d4915bb83 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 24 Mar 2019 12:51:19 +0000 Subject: re PR fortran/78865 (ICE in create_tmp_var, at gimple-expr.c:473) 2019-03-24 Thomas Koenig PR fortran/78865 * interface.c (compare_actual_formal): Change errors about missing or extra to gfc_error_now to make sure they are issued. Change "spec" to "specifier" in message. * resolve.c (resolve_global_procedure): Also check for mismatching interface with global symbols if the namespace has already been resolved. 2019-03-24 Thomas Koenig PR fortran/78865 * gfortran.dg/altreturn_10.f90: New test. * gfortran.dg/whole_file_3.f90: Change dg-warning to dg-error. From-SVN: r269895 --- gcc/fortran/interface.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/fortran/interface.c') diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index c9781d7..5b8a0f9 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -2969,17 +2969,19 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, if (f->sym == NULL) { + /* These errors have to be issued, otherwise an ICE can occur. + See PR 78865. */ if (where) - gfc_error ("Missing alternate return spec in subroutine call " - "at %L", where); + gfc_error_now ("Missing alternate return specifier in subroutine " + "call at %L", where); return false; } if (a->expr == NULL) { if (where) - gfc_error ("Unexpected alternate return spec in subroutine " - "call at %L", where); + gfc_error_now ("Unexpected alternate return specifier in " + "subroutine call at %L", where); return false; } -- cgit v1.1