[Ada] Fix inheritance of representation items defined as aspects
When a representation item is defined by a pragma or attribute
definition clause, the entity it applies to is that of the Name of the
representation item. But when it is defined by an aspect definition, the
entity is directly denoted by the Entity attribute of the represenation
item. The circuitry that inherits representation items for derived types
or subtypes must account for these two possible cases.
2018-09-26 Thomas Quinot <quinot@adacore.com>
gcc/ada/
* sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a
representation item that is an N_Aspect_Definition, retrieve the
entity it applies to using the Entity attribute.
gcc/testsuite/
* gnat.dg/sso13.adb: New testcase.
From-SVN: r264636