aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-08-22 14:58:48 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-08-22 14:58:48 -0700
commit7f5e63076a3e596e2dd88825f0fe2659c20a5e84 (patch)
tree8c78d03d629c9690690dd3a65b9e2d84e426d6dd /gcc/expr.c
parentf8d0aee5c105df1c5d073a9a91fb467cd603f600 (diff)
downloadgcc-7f5e63076a3e596e2dd88825f0fe2659c20a5e84.zip
gcc-7f5e63076a3e596e2dd88825f0fe2659c20a5e84.tar.gz
gcc-7f5e63076a3e596e2dd88825f0fe2659c20a5e84.tar.bz2
tree.h (SAVE_EXPR_RESOLVED_P): New.
* tree.h (SAVE_EXPR_RESOLVED_P): New. * gimplify.c (gimplify_save_expr): Use it. * expr.c (expand_expr_real_1): Likewise. Also set DECL_IGNORED_P on the temporary variable. From-SVN: r86387
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index c0f10d9..81b103d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6497,7 +6497,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
tree val = TREE_OPERAND (exp, 0);
rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl);
- if (TREE_CODE (val) != VAR_DECL || !DECL_ARTIFICIAL (val))
+ if (!SAVE_EXPR_RESOLVED_P (exp))
{
/* We can indeed still hit this case, typically via builtin
expanders calling save_expr immediately before expanding
@@ -6508,7 +6508,9 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
val = build_decl (VAR_DECL, NULL, TREE_TYPE (exp));
DECL_ARTIFICIAL (val) = 1;
+ DECL_IGNORED_P (val) = 1;
TREE_OPERAND (exp, 0) = val;
+ SAVE_EXPR_RESOLVED_P (exp) = 1;
if (!CONSTANT_P (ret))
ret = copy_to_reg (ret);