]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/14749 (Miscompilation of bit test)
authorSteven Bosscher <stevenb@suse.de>
Fri, 7 May 2004 16:25:51 +0000 (16:25 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Fri, 7 May 2004 16:25:51 +0000 (16:25 +0000)
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
gcc/expr.c

index a954170c4269824c22e03f3b72e94d902c03409c..1937cbd6571f9fe175766cd9e2fa5b4c86e112cd 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-07  Steven Bosscher  <stevenb@suse.de>
+
+       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  <doko@debian.org>
 
        Backport:
index 3193271dbef76369cab540fc3c5e880da16b716b..7f253218a8751a27f981b111faa22c22e467684b 100644 (file)
@@ -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);