This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Use of VLA in struct in gcc-torture/execute/20020412-1.c
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 7 Sep 2002 21:59:00 -0400 (EDT)
- Subject: Use of VLA in struct in gcc-torture/execute/20020412-1.c
The testsuite program 20020412-1.c fails on all PA ports. I have been
working on the passing of structs and currently under hppa-linux this
test causes an ICE at function.c:646 because GCC doesn't know how
to allocate a tempory of variable size.
The test contains the following code:
int z = 5;
struct { char a[z]; } x, y;
My understanding of 6.7.5.2 is that 'a' is not an ordinary type and
can't be a member of a structure or union. Can a C expert comment?
Possibly, passing structures with an unknown size by reference might
fix the problem. However, this is contrary to the 64-bit ABI where
nothing is passed by invisible reference.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)