diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-12-06 20:30:31 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-12-06 20:30:31 +0100 |
commit | 1c8b9983c4ea83e9dc9cc8b9043ab7bd57e8d25b (patch) | |
tree | 80fb7ab9558faa5067aa93c163c923dc75d9361f | |
parent | f4477cf43336547f37db8243e9086fa3b5941e14 (diff) | |
download | gcc-1c8b9983c4ea83e9dc9cc8b9043ab7bd57e8d25b.zip gcc-1c8b9983c4ea83e9dc9cc8b9043ab7bd57e8d25b.tar.gz gcc-1c8b9983c4ea83e9dc9cc8b9043ab7bd57e8d25b.tar.bz2 |
re PR bootstrap/46528 (profiledbootstrap failure)
PR tree-optimization/46528
PR debug/46338
* profile.c (branch_prob): Make sure last is never set to a debug
stmt.
From-SVN: r167515
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/profile.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7412c20..48c60c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-12-06 Jakub Jelinek <jakub@redhat.com> + PR tree-optimization/46528 + PR debug/46338 + * profile.c (branch_prob): Make sure last is never set to a debug + stmt. + PR debug/46771 * reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode on DEBUG_INSNs. diff --git a/gcc/profile.c b/gcc/profile.c index 9e8c203..606e3b2 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; } |