http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47564
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-01
15:47:07 UTC ---
Following works by not doing target_reinit once tree_rest_of_compilation calls
init_function_start, until final.
--- function.c.jj 2011-01-25 18:40:08.000000000 +0100
+++ function.c 2011-02-01 16:33:48.000000000 +0100
@@ -4294,7 +4294,10 @@ invoke_set_current_function_hook (tree f
cl_optimization_restore (&global_options, TREE_OPTIMIZATION (opts));
}
- targetm.set_current_function (fndecl);
+ /* Don't call targetm.set_current_function in between
+ prepare_function_start and following free_after_compilation. */
+ if (regno_reg_rtx == NULL)
+ targetm.set_current_function (fndecl);
}
}