Commit 76c1a7ec by Tobias Burnus Committed by Tobias Burnus

trans-decl.c (gfc_trans_deferred_vars): Free expr after use.

2013-03-01  Tobias Burnus  <burnus@net-b.de>

        * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
        * trans-io.c (build_dt): Ditto.

From-SVN: r196372
parent cf2f3b1b
2013-03-01 Tobias Burnus <burnus@net-b.de>
* trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
* trans-io.c (build_dt): Ditto.
2013-02-24 Joseph Myers <joseph@codesourcery.com> 2013-02-24 Joseph Myers <joseph@codesourcery.com>
* resolve.c (generate_component_assignments): Don't use UTF-8 * resolve.c (generate_component_assignments): Don't use UTF-8
......
...@@ -3818,10 +3818,12 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) ...@@ -3818,10 +3818,12 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
NULL_TREE, true, NULL, NULL_TREE, true, NULL,
true); true);
else else
tmp = gfc_deallocate_scalar_with_status (se.expr, NULL_TREE, {
true, gfc_expr *expr = gfc_lval_expr_from_sym (sym);
gfc_lval_expr_from_sym (sym), tmp = gfc_deallocate_scalar_with_status (se.expr, NULL_TREE,
sym->ts); true, expr, sym->ts);
gfc_free_expr (expr);
}
} }
if (sym->ts.type == BT_CLASS) if (sym->ts.type == BT_CLASS)
{ {
......
...@@ -1782,6 +1782,8 @@ build_dt (tree function, gfc_code * code) ...@@ -1782,6 +1782,8 @@ build_dt (tree function, gfc_code * code)
mask |= set_string (&block, &post_block, var, IOPARM_dt_namelist_name, mask |= set_string (&block, &post_block, var, IOPARM_dt_namelist_name,
nmlname); nmlname);
gfc_free_expr (nmlname);
if (last_dt == READ) if (last_dt == READ)
mask |= IOPARM_dt_namelist_read_mode; mask |= IOPARM_dt_namelist_read_mode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment