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]

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)


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