In the case where the overlaid object is nested in a record or is an
array element as in:
for Foo'Address use Item.Nested_Item'Address;
or for Foo'Address use Item (Bar)'Address;
the compiler was not emitting a warning in case of differing
Scalar_Storage_Order values.
gcc/ada/ChangeLog:
* sem_util.adb (Find_Overlaid_Entity): Add extra parameter to
extract the type being overlaid.
(Note_Possible_Modification): Adjust call to Find_Overlaid_Entity.
(Ultimate_Overlaid_Entity): Likewise.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Likewise.
* sem_util.ads (Find_Overlaid_Entity): Add extra parameter to
extract the type being overlaid.
* freeze.adb (Check_Address_Clause): Likewise.