diff options
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 62c7d37..7539aa7 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5945,6 +5945,13 @@ extract_compcall_passed_object (gfc_expr* e) { gfc_expr* po; + if (e->expr_type == EXPR_UNKNOWN) + { + gfc_error ("Error in typebound call at %L", + &e->where); + return NULL; + } + gcc_assert (e->expr_type == EXPR_COMPCALL); if (e->value.compcall.base_object) @@ -6090,7 +6097,11 @@ check_typebound_baseobject (gfc_expr* e) if (!base) return false; - gcc_assert (base->ts.type == BT_DERIVED || base->ts.type == BT_CLASS); + if (base->ts.type != BT_DERIVED && base->ts.type != BT_CLASS) + { + gfc_error ("Error in typebound call at %L", &e->where); + goto cleanup; + } if (base->ts.type == BT_CLASS && !gfc_expr_attr (base).class_ok) return false; |