From 8173746830c9a85136a896bdb9eb3075a34e68e5 Mon Sep 17 00:00:00 2001 From: Olga Golovanevsky Date: Tue, 24 Apr 2007 15:54:18 +0000 Subject: [PATCH] fix for PR31617 From-SVN: r124109 --- gcc/ChangeLog | 6 ++++++ gcc/fold-const.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7cc6435ea02..9ab42d9a6af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-04-24 Richard Guenther + Olga Golovanevsky + + * fold-const.c (multiple_of_p): Check for bottom + to be zero. + 2007-04-24 Richard Henderson * libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4e8f34f06ec..7a8afcdbe87 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0e11c6999d8..7980e53297c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-04-24 Andrew Pinski + Olga Golovanevsky + + * g++.dg/other/str_empty.C: New test. + 2007-04-24 Richard Henderson * gcc.dg/vect/vect.exp: Don't run tests on Alpha. -- 2.30.2