This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ patch] Fix thunk emitting code


Hi,
While trying to save memory, tree-optimize release DECL_ARGUMENTS list.  This
breaks C++ frontend that still needs argument list to produce thunks.  This
happens to worky only because we don't release the memory when inlining due to
bug, but passing -fno-inline causes several testsuite faiulres.

I am going to fix the tree-optimize bug next, so this will reproduce
more easilly then.

OK for mainline/branch?
Honza

2004-01-28  Jan Hubicka  <jh@suse.czi
	* semantics.c (expand_body)  Do emit_associated_thunks before
	expansion.
Index: cp/semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.385
diff -c -3 -p -r1.385 semantics.c
*** cp/semantics.c	26 Jan 2004 20:11:43 -0000	1.385
--- cp/semantics.c	28 Jan 2004 00:26:38 -0000
*************** expand_body (tree fn)
*** 2885,2890 ****
--- 2885,2893 ----
    /* ??? When is this needed?  */
    saved_function = current_function_decl;
  
+   /* Emit any thunks that should be emitted at the same time as FN.  */
+   emit_associated_thunks (fn);
+ 
    timevar_push (TV_INTEGRATION);
    optimize_function (fn);
    timevar_pop (TV_INTEGRATION);
*************** expand_body (tree fn)
*** 2894,2902 ****
    current_function_decl = saved_function;
  
    extract_interface_info ();
- 
-   /* Emit any thunks that should be emitted at the same time as FN.  */
-   emit_associated_thunks (fn);
  
    /* If this function is marked with the constructor attribute, add it
       to the list of functions to be called along with constructors
--- 2897,2902 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]