diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17cb2eadf7df..d7f1211dd9c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-12-20 Iain Sandoe + Jan Hubicka + + PR middle-end/46916 + * opts.c (finish_options): Enable -freorder-functions + when -freorder-blocks-and-partition is active. + 2010-12-20 Iain Sandoe PR c++/46904 diff --git a/gcc/opts.c b/gcc/opts.c index cc4181ea03f7..12f79f94da16 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -755,6 +755,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_flag_reorder_blocks = 1; } + if (opts->x_flag_reorder_blocks_and_partition + && !opts_set->x_flag_reorder_functions) + opts->x_flag_reorder_functions = 1; + /* Pipelining of outer loops is only possible when general pipelining capabilities are requested. */ if (!opts->x_flag_sel_sched_pipelining)