From: Richard Kenner Date: Mon, 26 Jun 1995 22:57:58 +0000 (-0400) Subject: (expand_expr, case COND_EXPR): Protect the condition from being evaluated more than... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0184223489d6ddf887c169e01dc9cd7325677fbc;p=gcc.git (expand_expr, case COND_EXPR): Protect the condition from being evaluated more than once. (expand_expr, case COND_EXPR): Protect the condition from being evaluated more than once. (do_jump, case TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR): Likewise. From-SVN: r10055 --- diff --git a/gcc/expr.c b/gcc/expr.c index d2727cd49b1..a7c6702cb18 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6013,6 +6013,7 @@ expand_expr (exp, target, tmode, modifier) TREE_TYPE (cond) = integer_type_node; RTL_EXPR_RTL (cond) = flag; RTL_EXPR_SEQUENCE (cond) = NULL_RTX; + cond = save_expr (cond); if (! left_cleanups) left_cleanups = integer_zero_node; @@ -8950,6 +8951,7 @@ do_jump (exp, if_false_label, if_true_label) TREE_TYPE (cond) = integer_type_node; RTL_EXPR_RTL (cond) = flag; RTL_EXPR_SEQUENCE (cond) = NULL_RTX; + cond = save_expr (cond); new_cleanups = build (COND_EXPR, void_type_node, truthvalue_conversion (cond), @@ -9007,6 +9009,7 @@ do_jump (exp, if_false_label, if_true_label) TREE_TYPE (cond) = integer_type_node; RTL_EXPR_RTL (cond) = flag; RTL_EXPR_SEQUENCE (cond) = NULL_RTX; + cond = save_expr (cond); new_cleanups = build (COND_EXPR, void_type_node, truthvalue_conversion (cond),