From b941bcbc1f5763e3c3576a50769c6ec65445e93c Mon Sep 17 00:00:00 2001 From: Craig Burley Date: Mon, 13 Jul 1998 18:21:01 -0400 Subject: [PATCH] stmt.c (expand_expr_stmt): If not assigning fresh value to last_expr_value... * stmt.c (expand_expr_stmt): If not assigning fresh value to last_expr_value, zero it, so old garbage doesn't get dereferenced. From-SVN: r21116 --- gcc/ChangeLog | 6 ++++++ gcc/stmt.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c55abf0944..2d78aacdc32 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Jul 13 23:18:39 1998 Craig Burley + + * stmt.c (expand_expr_stmt): If not assigning fresh + value to last_expr_value, zero it, so old garbage + doesn't get dereferenced. + Mon Jul 13 23:06:55 1998 Henning.Petersen@t-online.de (Henning Petersen) * gcse.c (hash_scan_insn): Add missing argument declaration. diff --git a/gcc/stmt.c b/gcc/stmt.c index 18ca944ee2d..9ebe6705e0f 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1533,7 +1533,9 @@ expand_expr_stmt (exp) exp = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (exp)), exp); last_expr_type = TREE_TYPE (exp); - if (! flag_syntax_only || expr_stmts_for_value) + if (flag_syntax_only && ! expr_stmts_for_value) + last_expr_value = 0; + else last_expr_value = expand_expr (exp, (expr_stmts_for_value ? NULL_RTX : const0_rtx),