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]

Returning structures



The PowerPC ELF ABI, at least, has wording like

  structures or unions that do not meet the requirements for being
  returned in registers are returned in a storage buffer allocated
  by the caller.  The address of this buffer is passed as a hidden
  argument ...

Sometimes, GCC will decide it needs not allocate a buffer, instead
using some other place for the data.  This causes testcase
execute/20010124-1.c to fail, as the called routine expects that the
buffer is distinct from any other memory it knows about and given the
wording above this is reasonable.  So I intend to change calls.c so
that it always allocates a buffer.

Does anyone know of any ABIs which do not have this requirement?  I am
wondering if this should be left conditional or removed altogether.

-- 
Geoff Keating <geoffk@redhat.com>


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