This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: execute/20020307-2.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Mar 2002 04:53:44 -0500
- Subject: Re: execute/20020307-2.c
- References: <20020326005153.A24317@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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