diff options
author | Stuart Hastings <stuart@apple.com> | 2005-01-27 01:03:27 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@gcc.gnu.org> | 2005-01-27 01:03:27 +0000 |
commit | 4356a1bf59fa37ac5abeebc13bb2a5676563b7b1 (patch) | |
tree | d1cb899bc25017623d5b6ecc0f17e259e7df6a27 /gcc/gimplify.c | |
parent | c006df4eecdd0b1abbaca7728893d3729df10e65 (diff) | |
download | gcc-4356a1bf59fa37ac5abeebc13bb2a5676563b7b1.zip gcc-4356a1bf59fa37ac5abeebc13bb2a5676563b7b1.tar.gz gcc-4356a1bf59fa37ac5abeebc13bb2a5676563b7b1.tar.bz2 |
gimplify.c (shortcut_cond_expr): Re-compute side-effects.
2005-01-26 Stuart Hastings <stuart@apple.com>
* gcc/gimplify.c (shortcut_cond_expr): Re-compute side-effects.
* gcc/testsuite/gcc.c-torture/execute/20050125-1.c: New.
From-SVN: r94300
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index ac9ae14..0fd3943 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1923,6 +1923,7 @@ shortcut_cond_expr (tree expr) { TREE_OPERAND (expr, 0) = TREE_OPERAND (pred, 1); then_ = shortcut_cond_expr (expr); + then_se = then_ && TREE_SIDE_EFFECTS (then_); pred = TREE_OPERAND (pred, 0); expr = build (COND_EXPR, void_type_node, pred, then_, NULL_TREE); } @@ -1937,6 +1938,7 @@ shortcut_cond_expr (tree expr) { TREE_OPERAND (expr, 0) = TREE_OPERAND (pred, 1); else_ = shortcut_cond_expr (expr); + else_se = else_ && TREE_SIDE_EFFECTS (else_); pred = TREE_OPERAND (pred, 0); expr = build (COND_EXPR, void_type_node, pred, NULL_TREE, else_); } |