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; } } }