[Ada] Fully propagate representation aspects through renaming
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 16 Dec 2019 10:34:27 +0000 (10:34 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Dec 2019 10:34:27 +0000 (10:34 +0000)
commit2cee58d81076c99ab3db3305c1850bf79fa12f17
tree0161b2c951d4dd1cdd64eee3a940052271d687ed
parent0bba838d7f4e9b851416d463d077b28aff0b561f
[Ada] Fully propagate representation aspects through renaming

2019-12-16  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_ch8.adb (Analyze_Object_Renaming): Set Atomic, Independent
and Volatile_Full_Access aspects on the entity of the renaming
the same way as the Volatile aspect is set.
* sem_util.ads (Is_Atomic_Object_Entity): Move declaration to...
(Is_Independent_Object): New function.
(Is_Volatile_Full_Access_Object): Likewise.
* sem_util.adb (Is_Atomic_Object_Entity): ...here.
(Prefix_Has_Atomic_Components): Minor tweak.
(Is_Atomic_Object): Test Is_Atomic on the Etype uniformly.
(Is_Atomic_Or_VFA_Object): Call Is_Volatile_Full_Access_Object.
(Is_Independent_Object): New predicate.
(Is_Subcomponent_Of_Atomic_Object): Remove redundant test.
(Is_Volatile_Full_Access_Object): New predicate.
(Is_Volatile_Prefix): Rename into...
(Prefix_Has_Volatile_Components): ... and call
Is_Volatile_Object.
(Object_Has_Volatile_Components): Delete.
(Is_Volatile_Object): Simplify.
* gcc-interface/trans.c (node_is_volatile_full_access): Adjust
comment.

From-SVN: r279429
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c
gcc/ada/sem_ch8.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads