From: Steven Bosscher Date: Fri, 7 May 2004 16:25:51 +0000 (+0000) Subject: re PR rtl-optimization/14749 (Miscompilation of bit test) X-Git-Tag: releases/gcc-3.3.4~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=860fc2057ea0de268a3fe5d6ea044076e07b498b;p=thirdparty%2Fgcc.git 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 --- 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);