This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/61583] [4.9/4.10 regression] stage2 and stage3 compare failure due to value range loss
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Jun 2014 05:49:26 +0000
- Subject: [Bug bootstrap/61583] [4.9/4.10 regression] stage2 and stage3 compare failure due to value range loss
- Auto-submitted: auto-generated
- References: <bug-61583-4 at http dot gcc dot gnu dot org/bugzilla/>
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;
}
}
}