aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2019-03-24 12:51:19 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2019-03-24 12:51:19 +0000
commit866664a3813a97fda8c7b6ebdd32d10d4915bb83 (patch)
tree2bc39173ae2171234cb20a861d40984cdfcf11ad /gcc/fortran/interface.c
parentc1e62ea1afea4c19cbe010a424f6b3cf7c181859 (diff)
downloadgcc-866664a3813a97fda8c7b6ebdd32d10d4915bb83.zip
gcc-866664a3813a97fda8c7b6ebdd32d10d4915bb83.tar.gz
gcc-866664a3813a97fda8c7b6ebdd32d10d4915bb83.tar.bz2
re PR fortran/78865 (ICE in create_tmp_var, at gimple-expr.c:473)
2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org> 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 <tkoenig@gcc.gnu.org> 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
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c10
1 files changed, 6 insertions, 4 deletions
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;
}