ada: Fix incorrect copies being used with 'Address
commit203dece1e9d061582f34009907c048be628e960d
authorMarc Poulhiès <poulhies@adacore.com>
Mon, 3 Apr 2023 14:36:13 +0000 (3 16:36 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 30 May 2023 07:12:18 +0000 (30 09:12 +0200)
treed954ebedb287f0d32014379a05e4cfd2315a7004
parent0a769b29ee0beef9998f7694894b6c8f5aa93e6a
ada: Fix incorrect copies being used with 'Address

When using 'Address on an object with a size clause, gigi would end up
creating a copy and using its address instead of the one of the original
object, leading to incorrect behavior. Remove the conversion (that
triggers the copy) when 'Address is applied to a declaration.

gcc/ada/

* gcc-interface/trans.cc (Attribute_to_gnu): Also strip conversion
in case of DECL.
gcc/ada/gcc-interface/trans.cc