[Ada] Fix inheritance of representation items defined as aspects
commit724be312a13fd3c7218a38fc894883657c2b2302
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2018 09:20:05 +0000 (26 09:20 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2018 09:20:05 +0000 (26 09:20 +0000)
tree03afa6c40302957d55a36ab4791afc3234c1e4ef
parentf6640da5cd79f99e92ea7e78af48b3fcef430a3f
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264636 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/sem_ch13.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/sso13.adb [new file with mode: 0644]