http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46528

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-25 
12:40:32 UTC ---
Please try

Index: gcc/profile.c
===================================================================
--- gcc/profile.c       (revision 167127)
+++ gcc/profile.c       (working copy)
@@ -940,7 +943,8 @@ branch_prob (void)
          for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi))
            {
              last = gsi_stmt (gsi);
-             if (gimple_has_location (last))
+             if (!is_gimple_debug (last)
+                 && gimple_has_location (last))
                break;
            }

we do CFG manipulations based on debug stmts (verified with a later
assert that triggers on -O2 -g -fprofile-use).

It's of course unfortunate that we do this BB splitting at all when
not doing coverage test.

Reply via email to