diff options
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 9e8c2036ca1..606e3b2e866 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -936,11 +936,12 @@ branch_prob (void) /* It may happen that there are compiler generated statements without a locus at all. Go through the basic block from the last to the first statement looking for a locus. */ - for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi)) + for (gsi = gsi_last_nondebug_bb (bb); + !gsi_end_p (gsi); + gsi_prev_nondebug (&gsi)) { last = gsi_stmt (gsi); - if (!is_gimple_debug (last) - && gimple_has_location (last)) + if (gimple_has_location (last)) break; } |