[Ada] Implement new legality rules introduced in C.6(13) by AI12-0128

Programming / Compilers / GCC - pmderodat [138bc75d-0d04-0410-961f-82ee72b054a4] - 16 December 2019 10:33 EST

2019-12-16 Eric Botcazou

gcc/ada/

- doc/gnat_rm/implementation_defined_pragmas.rst (VFA): Document extension of the no-aliasing rule to any subcomponent.
- freeze.adb (Freeze_Object_Declaration): Small comment tweak. (Freeze_Record_Type): Do not deal with delayed aspect specifications for components here but... (Freeze_Entity): ...here instead.
- sem_ch12.adb (Instantiate_Object): Improve wording of errors given for legality rules in C.6(12) and implement the new rule in C.6(13).
- sem_res.adb (Resolve_Actuals): Likewise.
- sem_prag.adb (Check_Atomic_VFA): New procedure implementing the new legality rules in C.6(13). (Process_Atomic_Independent_Shared_Volatile): Call Check_Atomic_VFA to check the legality rules. Factor out code marking types into... (Mark_Type): ...this new procedure. (Check_VFA_Conflicts): Do not check the legality rules here. (Pragma_Atomic_Components): Call Check_Atomic_VFA on component type.
- sem_util.ads (Is_Subcomponent_Of_Atomic_Object): Declare.
- sem_util.adb (Is_Subcomponent_Of_Atomic_Object): New predicate.
- gnat_rm.texi: Regenerate.

c70b626f953 [Ada] Implement new legality rules introduced in C.6(13) by AI12-0128
gcc/ada/ChangeLog | 26 ++
.../doc/gnat_rm/implementation_defined_pragmas.rst | 2 +-
gcc/ada/freeze.adb | 99 +++---
gcc/ada/gnat_rm.texi | 2 +-
gcc/ada/sem_ch12.adb | 31 +-
gcc/ada/sem_prag.adb | 349 +++++++++++++++------
gcc/ada/sem_res.adb | 22 +-
gcc/ada/sem_util.adb | 20 ++
gcc/ada/sem_util.ads | 4 +
9 files changed, 394 insertions(+), 161 deletions(-)

Upstream: gcc.gnu.org


  • Share