http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46916
--- Comment #67 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-15 17:11:28 UTC --- Created attachment 22768 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22768 darwin-function-section-patch OK - sorted out a couple of minor glitches... ...I'm going to reg-test the attached more widely (powerpc + other languages). this does not suffer from the debug issue... but... Honza, two points: 1a / opts.c - this should probably be placed _after_ all the tests that might set x_flag_reorder_blocks_and_partition to 0. 1b / it should be conditional on the User _not_ having set x_flag_reorder_functions ;) something like --- (in the attached patch too) if (opts->x_flag_reorder_blocks_and_partition && !opts_set->x_flag_reorder_functions) opts->x_flag_reorder_functions = 1; === 2. The patch attached actually clears 46904 as well, ---- BUT there are several new fails FAIL: partition{1,2}.C * -fprofile-use FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE FAIL: gcc.dg/tree-prof/pr34999.c compilation, -fprofile-use -D_PROFILE_USE these are FATAL:Symbol _foo.eh already defined. can you separate the portion of your patch that would resolve this - without introducing the elements we think are responsible for the debug problem?