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: PREFERRED_STACK_BOUNDARY/function calling code fix


> Hi
> 
> Here's a test case which aborts on x86 with this patch installed
> 
> Compile with -O1 or above
> 
> Graham

Graham, it would be also nice idea to add your testcase to the testsuite.  I've
bootstraped with older version of this patch, so before installing it I only
run the testsuite, so it looks like we don't have any testcase for the nested
functions calls, that was all broken after my patch.

Sorry,
Honza
> 
> PS I've also posted this test acse to gcc-bugs.
> 
> ----------------------------------------------------------------
> extern void abort (void);
> 
> static char arg0[] = "arg0";
> static char arg1[] = "arg1";
> 
> static void attr_rtx		(char *, char *);
> static char *attr_string        (char *);
> static void attr_eq		(char *, char *);
> 
> static void 
> attr_rtx (char *varg0, char *varg1)
> {
>   if (varg0 != arg0)
>     abort ();
> 
>   if (varg1 != arg1)
>     abort ();
> 
>   return;
> }
> 
> static void 
> attr_eq (name, value)
>      char *name, *value;
> {
>   return attr_rtx (attr_string (name),
> 		   attr_string (value));
> }
> 
> static char *
> attr_string (str)
>      char *str;
> {
>   return str;
> }
> 
> int main()
> {
>   attr_eq (arg0, arg1);
>   return 0;
> }
> --------------------------------------------------------------

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