diff mbox

Fix minor regression with size functions

Message ID 201304281929.58117.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou April 28, 2013, 5:29 p.m. UTC
It's a minor regression present on mainline and 4.8 branch: the size functions 
are output as (no-fn) in the .original dump file.

Bootstrapped/regtested on x86_64-suse-linux, applied on the mainline and 4.8 
branch as obvious (this only affects the Ada compiler).


2013-04-28  Eric Botcazou  <ebotcazou@adacore.com>

	* stor-layout.c (finalize_size_functions): Allocate a structure and
	reset cfun before dumping the functions.
diff mbox

Patch

Index: stor-layout.c
===================================================================
--- stor-layout.c	(revision 198366)
+++ stor-layout.c	(working copy)
@@ -290,6 +290,8 @@  finalize_size_functions (void)
 
   for (i = 0; size_functions && size_functions->iterate (i, &fndecl); i++)
     {
+      allocate_struct_function (fndecl, false);
+      set_cfun (NULL);
       dump_function (TDI_original, fndecl);
       gimplify_function_tree (fndecl);
       dump_function (TDI_generic, fndecl);