http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542
--- Comment #3 from Teresa Johnson <tejohnson at google dot com> --- On Wed, Dec 18, 2013 at 6:15 AM, Teresa Johnson <tejohn...@google.com> wrote: > Thanks, I am able to reproduce now with the gold linker option. > Investigating... > Teresa > > On Wed, Dec 18, 2013 at 12:52 AM, trippels at gcc dot gnu.org > <gcc-bugzi...@gcc.gnu.org> wrote: >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59542 >> >> Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: >> >> What |Removed |Added >> ---------------------------------------------------------------------------- >> CC| |tejohnson at google dot com >> >> -- >> You are receiving this mail because: >> You are on the CC list for the bug. Here is the patch that fixes it, and I am currently regression testing: Teresa 2013-12-18 Teresa Johnson <tejohn...@google.com> * bb-reorder.c (duplicate_computed_gotos): Invoke fixup_partitions if we have made any changes. Index: bb-reorder.c =================================================================== --- bb-reorder.c (revision 206100) +++ bb-reorder.c (working copy) @@ -2390,6 +2390,7 @@ duplicate_computed_gotos (void) basic_block bb, new_bb; bitmap candidates; int max_size; + bool changed = false; if (n_basic_blocks_for_fn (cfun) <= NUM_FIXED_BLOCKS + 1) return 0; @@ -2486,9 +2487,17 @@ duplicate_computed_gotos (void) new_bb->aux = bb->aux; bb->aux = new_bb; new_bb->flags |= BB_VISITED; + changed = true; } done: + /* Duplicating blocks above will redirect edges and may cause hot blocks + previously reached by both hot and cold blocks to become dominated only + by cold blocks. This will cause the verification when leaving cfg layout + mode to fail, and lead to now cold code in the hot section. Invoke + fixup_partitions to address these problems. */ + if (changed) + fixup_partitions (); cfg_layout_finalize (); BITMAP_FREE (candidates); > > > > -- > Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413