From: Paolo Bonzini Date: Tue, 10 Aug 2004 08:38:29 +0000 (+0000) Subject: expr.c (expand_expr_real_1): Add back code that was not dead. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25f3e06c7c272acfe17d2502a03330dcf5447b97;p=gcc.git expr.c (expand_expr_real_1): Add back code that was not dead. 2004-08-09 Paolo Bonzini * expr.c (expand_expr_real_1): Add back code that was not dead. From-SVN: r85742 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6eb4be82d90..87045e6484c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-08-09 Paolo Bonzini + + * expr.c (expand_expr_real_1): Add back code that was not dead. + 2004-08-09 Andrew Pinski * c-common.c (c_common_get_alias_set): Set the aliasing set of the type diff --git a/gcc/expr.c b/gcc/expr.c index 7334c59ca39..607115b01b6 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7778,6 +7778,32 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return temp; } + /* If no set-flag instruction, must generate a conditional store + into a temporary variable. Drop through and handle this + like && and ||. */ + + if (! ignore + && (target == 0 + || modifier == EXPAND_STACK_PARM + || ! safe_from_p (target, exp, 1) + /* Make sure we don't have a hard reg (such as function's return + value) live across basic blocks, if not optimizing. */ + || (!optimize && REG_P (target) + && REGNO (target) < FIRST_PSEUDO_REGISTER))) + target = gen_reg_rtx (tmode != VOIDmode ? tmode : mode); + + if (target) + emit_move_insn (target, const0_rtx); + + op1 = gen_label_rtx (); + jumpifnot (exp, op1); + + if (target) + emit_move_insn (target, const1_rtx); + + emit_label (op1); + return ignore ? const0_rtx : target; + case TRUTH_NOT_EXPR: if (modifier == EXPAND_STACK_PARM) target = 0;