diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-06-18 00:15:30 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-06-18 00:15:30 +0200 |
commit | 8399a0cc2d64b1480c8dcc82af710c21ad1678b3 (patch) | |
tree | f98c004da20f46815426d886695c83b59079ca0a /gcc/fortran/resolve.c | |
parent | 60de8907d1ad3bb0c8f5943133a4af2702259b70 (diff) | |
download | gcc-8399a0cc2d64b1480c8dcc82af710c21ad1678b3.zip gcc-8399a0cc2d64b1480c8dcc82af710c21ad1678b3.tar.gz gcc-8399a0cc2d64b1480c8dcc82af710c21ad1678b3.tar.bz2 |
re PR fortran/44558 ([OOP] ICE on invalid code: called TBP subroutine as TBP function)
2010-06-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/44558
* resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
Return directly in case of an error.
2010-06-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/44558
* gfortran.dg/typebound_call_15.f03: New.
From-SVN: r160948
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 7e6b75a..52920f4 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5498,7 +5498,8 @@ resolve_typebound_function (gfc_expr* e) /* Treat the call as if it is a typebound procedure, in order to roll out the correct name for the specific function. */ - resolve_compcall (e, &name); + if (resolve_compcall (e, &name) == FAILURE) + return FAILURE; ts = e->ts; /* Then convert the expression to a procedure pointer component call. */ @@ -5571,7 +5572,8 @@ resolve_typebound_subroutine (gfc_code *code) if (code->expr1->value.compcall.tbp->is_generic) genname = code->expr1->value.compcall.name; - resolve_typebound_call (code, &name); + if (resolve_typebound_call (code, &name) == FAILURE) + return FAILURE; ts = code->expr1->ts; /* Then convert the expression to a procedure pointer component call. */ |