http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46916
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-14 10:08:25 UTC --- Hi, does the following patch help? Index: opts.c =================================================================== --- opts.c (revision 167752) +++ opts.c (working copy) @@ -738,6 +738,9 @@ finish_options (struct gcc_options *opts opts->x_flag_reorder_blocks = 1; } + if (opts->x_flag_reorder_blocks_and_partition) + opts->x_flag_reorder_blocks = 1; + /* If the target requested unwind info, then turn off the partitioning optimization with a different message. Likewise, if the target does not support named sections. */ it seems that with -freorder-functions-and-partition we should always imply -freorder-functions. Without this the partitioning code will now partition in between the same function section that is no-op and probably leads to failure. This however also imply a semi-latent bug - if -freorder-functions-and-partition breaks on cases where both hot and cold sections are the same, it ought to disable itself, because for some functions (like ones in named sections) we can not partition then.