[Ada] Fix minor issue with unconstrained packed arrays
Eric Botcazou
ebotcazou@adacore.com
Tue May 28 08:48:00 GMT 2019
The compiler allocates the non-packed size for a function returning a
parameter of an unconstrained packed array type.
Tested on x86_64-suse-linux, applied on the mainline and 9 branch.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
for 'Size too.
(Identifier_to_gnu): Use the actual subtype for a reference to a
packed array in a return statement.
(Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
the prefix in every case.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 4029 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190528/e7e3a77f/attachment.bin>
More information about the Gcc-patches
mailing list