This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/61583] [4.9/4.10 regression] stage2 and stage3 compare failure due to value range loss


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]