This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38934] [4.3/4.4 Regression] ICE in set_value_range, at tree-vrp.c:398
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2009 10:25:10 -0000
- Subject: [Bug middle-end/38934] [4.3/4.4 Regression] ICE in set_value_range, at tree-vrp.c:398
- References: <bug-38934-7849@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from jakub at gcc dot gnu dot org 2009-01-27 10:25 -------
So, what should we do for 4.4 then?
--- tree-vrp.c.jj 2009-01-02 09:32:55.000000000 +0100
+++ tree-vrp.c 2009-01-27 11:16:57.000000000 +0100
@@ -1620,7 +1620,8 @@ extract_range_from_assert (value_range_t
all should be optimized away above us. */
if ((cond_code == LT_EXPR
&& compare_values (max, min) == 0)
- || is_overflow_infinity (max))
+ || is_overflow_infinity (max)
+ || TREE_OVERFLOW (max))
set_value_range_to_varying (vr_p);
else
{
@@ -1655,7 +1656,8 @@ extract_range_from_assert (value_range_t
all should be optimized away above us. */
if ((cond_code == GT_EXPR
&& compare_values (min, max) == 0)
- || is_overflow_infinity (min))
+ || is_overflow_infinity (min)
+ || TREE_OVERFLOW (min))
set_value_range_to_varying (vr_p);
else
{
fixes this for me (and, is_overflow_infinity check could be actually dropped).
There is a problem with the testcase also - while the
integer constant is so large that it is unsigned
warning is emitted always,
integer overflow in expression
is emitted only for 32-bit HWI gcc, for x86_64 -m32 as well as -m64 only the
first warning is emitted.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38934