[Bug bootstrap/61583] [4.9/4.10 regression] stage2 and stage3 compare failure due to value range loss
amodra at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 23 05:49:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61583
--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
A bit more poking and I see that VR info is being added during the vrp1 pass by
tree-vrp.c:remove_range_assertions, but not when -g.
Hmm, at a guess the root cause of the problem is that is_unreachable is being
set to zero by debug statements. Trying the following simple patch
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c (revision 211398)
+++ gcc/tree-vrp.c (working copy)
@@ -6661,8 +6661,9 @@ remove_range_assertions (void)
}
else
{
+ if (!is_gimple_debug (gsi_stmt (si)))
+ is_unreachable = 0;
gsi_next (&si);
- is_unreachable = 0;
}
}
}
More information about the Gcc-bugs
mailing list