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]

Re: [PATCH] Fix structure return on SPARC64


> >  	* config/sparc/sparc.c (function_arg_record_value_1): Fix computation
> > 	of the number of integer registers required. Inspired from what's done
> > 	in other function_arg_record_value cases.
>
> Ok.

Thanks.  And, as you probably have guessed, the same ICE occurs when 
passing the structure to a function, so I've checked in the following 
testcase instead.


2004-01-22  Eric Botcazou  <ebotcazou@libertysurf.fr>

        * gcc.dg/struct-by-value-2.c: New test.


-- 
Eric Botcazou
/* This testcase caused a sanity check to abort on SPARC64
   because of a discrepancy between two functions involved
   in the calculation of structure layout.  */

/* { dg-do compile } */

struct S { float f1; int i1; int i2; float f2; };

extern void foo(struct S);

void bar(void)
{
  struct S s;
  foo(s);
}

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