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]

Re: C PATCH: Convert to function-at-a-time mode


On Tue, Sep 19, 2000 at 01:05:52AM +0200, Franz Sirl wrote:
> FAIL: gcc.c-torture/execute/strct-varg-1.c execution,  -O0

Alpha had the same problem; fixed thus.  The common factor
is that both alpha and ppc use SETUP_INCOMING_VARARGS, and
current_function_varargs wasn't set early enough.


r~


	* c-decl.c (c_expand_body): Call mark_varargs before
	expand_function_start.

Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-decl.c,v
retrieving revision 1.158
diff -c -p -d -r1.158 c-decl.c
*** c-decl.c	2000/09/17 19:39:55	1.158
--- c-decl.c	2000/09/19 02:10:33
*************** c_expand_body (fndecl, nested_p)
*** 6717,6722 ****
--- 6717,6726 ----
    immediate_size_expand = 0;
    cfun->x_dont_save_pending_sizes_p = 1;
  
+   /* If this is a varargs function, inform function.c.  */
+   if (c_function_varargs)
+     mark_varargs ();
+ 
    /* Set up parameters and prepare for return, for the function.  */
    expand_function_start (fndecl, 0);
  
*************** c_expand_body (fndecl, nested_p)
*** 6726,6735 ****
        && MAIN_NAME_P (DECL_NAME (fndecl))
        && DECL_CONTEXT (fndecl) == NULL_TREE)
      expand_main_function ();
- 
-   /* If this is a varargs function, inform function.c.  */
-   if (c_function_varargs)
-     mark_varargs ();
  
    /* Generate the RTL for this function.  */
    expand_stmt (DECL_SAVED_TREE (fndecl));
--- 6730,6735 ----

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