diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-09-15 17:44:22 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-09-15 17:44:22 +0200 |
commit | fc2655fb3082182075b288b58c93ac563ef661a0 (patch) | |
tree | cbc423f1f72886520c3332a55320578a49eb12e1 /gcc/fortran/class.c | |
parent | fd2805e11b7018a148a4f87201b4d85344b5aad4 (diff) | |
download | gcc-fc2655fb3082182075b288b58c93ac563ef661a0.zip gcc-fc2655fb3082182075b288b58c93ac563ef661a0.tar.gz gcc-fc2655fb3082182075b288b58c93ac563ef661a0.tar.bz2 |
arith.c (arith_power): Call gfc_free_expr in case of error.
2012-09-15 Tobias Burnus <burnus@net-b.de>
* arith.c (arith_power): Call gfc_free_expr in case of error.
* array.c (gfc_match_array_constructor): Initialize variable.
(gfc_resolve_character_array_constructor): Remove superfluous check.
(gfc_array_dimen_size): Add assert.
* check.c (numeric_check): Fix implicit typing.
* class.c (gfc_build_class_symbol): Add assert.
(finalize_component): Free memory.
* dump-parse-tree.c (show_namespace): Add assert.
* trans-io.c (transfer_namelist_element, transfer_expr): Avoid
memory leakage.
(gfc_trans_transfer): Add assert.
* trans.c (gfc_trans_runtime_check): Call va_end
From-SVN: r191344
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r-- | gcc/fortran/class.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index dca2cfc..2e347cb 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -503,7 +503,9 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, gfc_component *c; int rank; - if (as && *as && (*as)->type == AS_ASSUMED_SIZE) + gcc_assert (as); + + if (*as && (*as)->type == AS_ASSUMED_SIZE) { gfc_error ("Assumed size polymorphic objects or components, such " "as that at %C, have not yet been implemented"); @@ -838,6 +840,7 @@ finalize_component (gfc_expr *expr, gfc_symbol *derived, gfc_component *comp, for (c = comp->ts.u.derived->components; c; c = c->next) finalize_component (e, c->ts.u.derived, c, stat, code); + gfc_free_expr (e); } } |