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] |
Tested on i686-linux, committed on mainline. Gigi does not propagate the alignment on array subtypes, whereas it does on (unconstrained) array types. But it makes a padding record around the array subtype if it deems it necessary in order to bump the alignment. The problem occurs at subprogram boundaries: when the type is passed by reference because of the ABI, the padding type may be stripped so we may end up with a parameter of a reference type to the original, non-promoted type; when known_alignment is invoked on this parameter, it thus returns the default alignment. The fix is to treat parameters passed by reference by default like parameters passed by reference by virtue of their type. 2005-07-07 Eric Botcazou <ebotcazou@adacore.com> * decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not strip the padding type if the parameter is not passed by copy but reference by default.
Attachment:
difs.3
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |