fix for PR31617
authorOlga Golovanevsky <olga@gcc.gnu.org>
Tue, 24 Apr 2007 15:54:18 +0000 (15:54 +0000)
committerOlga Golovanevsky <olga@gcc.gnu.org>
Tue, 24 Apr 2007 15:54:18 +0000 (15:54 +0000)
From-SVN: r124109

gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog

index 7cc6435ea0220e7d580e98b3a40c6397f17f0cc6..9ab42d9a6af4cc8d61b839a9daed8a0dca42e017 100644 (file)
@@ -1,3 +1,9 @@
+2007-04-24  Richard Guenther  <rguenther@suse.de>
+           Olga Golovanevsky  <olga@il.ibm.com>
+
+       * fold-const.c (multiple_of_p): Check for bottom 
+       to be zero. 
+
 2007-04-24  Richard Henderson  <rth@redhat.com>
 
        * libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from 
index 4e8f34f06ec7bb2e9dfb36d5d991f0b66c7affe9..7a8afcdbe878417ece1555569b4cc5adae4357bf 100644 (file)
@@ -13216,6 +13216,7 @@ multiple_of_p (tree type, tree top, tree bottom)
 
     case INTEGER_CST:
       if (TREE_CODE (bottom) != INTEGER_CST
+         || integer_zerop (bottom)
          || (TYPE_UNSIGNED (type)
              && (tree_int_cst_sgn (top) < 0
                  || tree_int_cst_sgn (bottom) < 0)))
index 0e11c6999d88a2261357a1cb8292b75b15cb4030..7980e53297c770343aa92ffe94dc08acafece281 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-24  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+           Olga Golovanevsky  <olga@il.ibm.com>
+
+       * g++.dg/other/str_empty.C: New test.
+       
 2007-04-24  Richard Henderson  <rth@redhat.com>
 
        * gcc.dg/vect/vect.exp: Don't run tests on Alpha.