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: Patch to allow Ada to work with tree-ssa


Richard Kenner wrote:
    In particular, you've just added an extra entry to ARRAY_REF and
    COMPONENT_REF, making these two common tree nodes bigger.
    (COMPONENT_REF, in particular, is used extensively in C++; every
    access to a class member variable is a COMPONENT_REF.)  These extra
    entries are unnecessary in C and C++, meaning that for GCC's two
    most-used languages you've just increased memory usage with no
    benefit.  If you need some additional stuff for Ada, please find a way
    that doesn't penalize C and C++.

Here's the specific test case for C.  I note that it isn't valid C++,
but I don't know C++ well enough to make a similar case there.  Note
that the proposal involving using an INDIRECT_REF won't work with this
case because it's a bitfield.

int
sub1 (int n)
{
  struct foo {int arr[n]; int filler : 3; int fld : 4;} x;

  return x.fld;
}
This is not valid C89, C90, or documented as a GNU extension.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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