]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Use the address type of a Storage_Model_Type for 'Address
authorGary Dismukes <dismukes@adacore.com>
Fri, 18 Nov 2022 22:43:36 +0000 (17:43 -0500)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 1 Dec 2022 13:53:53 +0000 (14:53 +0100)
commit8e56d311d380cbdc37a910fa96c06c6eb91973d7
tree0e1e5fd8d2b389439cf3ab005a6a41014dc91a56
parenteeba836bf3dc26ea858020bc19e2c1a1606b75dd
ada: Use the address type of a Storage_Model_Type for 'Address

When an Address attribute applies to an object that is a dereference of
an access value whose type has aspect Designated_Storage_Model, the
attribute will now be treated as having the address type associated
with the Storage_Model_Type of the access type's associated Storage_Model
object instead of being of type System.Address.

gcc/ada/

* sem_attr.adb (Analyze_Attribute, Attribute_Address): In the case
where the attribute's prefix is a dereference of a value of an
access type that has aspect Designated_Storage_Model (or a
renaming of such a dereference), set the attribute's type to the
corresponding Storage_Model_Type's associated address type rather
than System.Address.
gcc/ada/sem_attr.adb