summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 3e23ca2e311..7c30cba9756 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -4964,7 +4964,11 @@ gfc_resolve_substring_charlen (gfc_expr *e)
end = NULL;
if (!start || !end)
- return;
+ {
+ gfc_free_expr (start);
+ gfc_free_expr (end);
+ return;
+ }
/* Length = (end - start +1). */
e->ts.u.cl->length = gfc_subtract (end, start);
@@ -6004,7 +6008,10 @@ resolve_typebound_generic_call (gfc_expr* e, const char **name)
gfc_expr* po;
po = extract_compcall_passed_object (e);
if (!po)
- return FAILURE;
+ {
+ gfc_free_actual_arglist (args);
+ return FAILURE;
+ }
gcc_assert (g->specific->pass_arg_num > 0);
gcc_assert (!g->specific->error);
@@ -6253,7 +6260,10 @@ 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. */
if (resolve_compcall (e, &name) == FAILURE)
- return FAILURE;
+ {
+ gfc_free_ref_list (new_ref);
+ return FAILURE;
+ }
ts = e->ts;
if (overridable)
@@ -6374,7 +6384,10 @@ resolve_typebound_subroutine (gfc_code *code)
}
if (resolve_typebound_call (code, &name) == FAILURE)
- return FAILURE;
+ {
+ gfc_free_ref_list (new_ref);
+ return FAILURE;
+ }
ts = code->expr1->ts;
if (overridable)
OpenPOWER on IntegriCloud