From 860fc2057ea0de268a3fe5d6ea044076e07b498b Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Fri, 7 May 2004 16:25:51 +0000 Subject: [PATCH] re PR rtl-optimization/14749 (Miscompilation of bit test) PR opt/14749 * expr.c (do_jump): If TREE_CONSTANT_OVERFLOW is set, don't trust integer_zerop. Just expand both branches. From-SVN: r81630 --- gcc/ChangeLog | 6 ++++++ gcc/expr.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a954170c4269..1937cbd6571f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-05-07 Steven Bosscher + + PR opt/14749 + * expr.c (do_jump): If TREE_CONSTANT_OVERFLOW is set, don't + trust integer_zerop. Just expand both branches. + 2004-04-29 Matthias Klose Backport: diff --git a/gcc/expr.c b/gcc/expr.c index 3193271dbef7..7f253218a875 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9891,6 +9891,9 @@ do_jump (exp, if_false_label, if_true_label) break; case INTEGER_CST: + /* ??? This should never happen - but it does, GCC PR opt/14749. */ + if (TREE_CONSTANT_OVERFLOW (exp)) + goto normal; temp = integer_zerop (exp) ? if_false_label : if_true_label; if (temp) emit_jump (temp); -- 2.47.2