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: execute/20020307-2.c


On Tue, Mar 26, 2002 at 12:51:53AM -0800, Richard Henderson wrote:
> This test case is incorrect.
> 
> The issue can be best seen on sparc64.  There, structures are either
> passed by value or by reference, and the decision is made based on the
> size of the structure.  The sparcv9 abi itself does not discuss structs
> with variable size, but the most sensible thing would seem to pass them
> by reference as well.  Which ever is chosen, by value or by reference,
> it is clear that one must choose one method and stick to it.

But isn't gcc allowed to optimize
  int z = 5;
  struct { char a[z]; } x, y;
into
  struct { char a[5]; } x, y;
(ie. should there be any difference between the two) wrt. passing conventions?
For sparcv9 ABI I think this requires clarification.

	Jakub


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