Patchwork Fix minor regression with size functions

mail settings
Submitter Eric Botcazou
Date April 28, 2013, 5:29 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/240264/
State New
Headers show


Eric Botcazou - April 28, 2013, 5:29 p.m.
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  <>

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


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);