This is the mail archive of the gcc@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: Use of VLA in struct in gcc-torture/execute/20020412-1.c


>>>>> John David Anglin writes:

John> The testsuite program 20020412-1.c fails on all PA ports.  I have been
John> working on the passing of structs and currently under hppa-linux this
John> test causes an ICE at function.c:646 because GCC doesn't know how
John> to allocate a tempory of variable size.

	This test fails for the same reason on AIX.  The testcase is using
a defined GCC extension, not ISO C.  The testcase was written to test
variable sized varargs, but on targets with ABIs like AIX, PPC64 Linux and
hppa-linux, it is testing the GCC extension.

	The ABIs on which this extension works pass structures by
reference.  I do not think that extending the ABIs of the other targets to
pass variable sized parameters by reference is correct.  This simply is a
feature of the ABIs which GCC currently cannot implement at present -- the
GCC extension is not supported on these platforms.

	Maybe GCC should warn/error when it encounters this construct of
passing a variable sized aggregate parameter and/or this should be
mentioned as a known bug in the GCC manual.

David


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