aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-06-26 18:57:58 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-06-26 18:57:58 -0400
commit0184223489d6ddf887c169e01dc9cd7325677fbc (patch)
tree81d84864b79a5b2667a4d011c1a1c4695aa7eeed /gcc
parent586c54377c48ead37ec4a7f04860e4c2550ad75d (diff)
downloadgcc-0184223489d6ddf887c169e01dc9cd7325677fbc.zip
gcc-0184223489d6ddf887c169e01dc9cd7325677fbc.tar.gz
gcc-0184223489d6ddf887c169e01dc9cd7325677fbc.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index d2727cd..a7c6702 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),