From 0184223489d6ddf887c169e01dc9cd7325677fbc Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 26 Jun 1995 18:57:58 -0400 Subject: [PATCH] (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 --- gcc/expr.c | 3 +++ 1 file changed, 3 insertions(+) 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), -- 2.30.2