[Ada] Implement new legality rules introduced in C.6(13) by AI12-0128
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 16 Dec 2019 10:33:08 +0000 (10:33 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Dec 2019 10:33:08 +0000 (10:33 +0000)
commitd6c7e020cffa8570c77e80da755c8963034657fb
tree3775aa45161e641db67e8c155cf2b3a4d137d437
parent070fa48b0a4fbdc754e18962d586f41cc263dad7
[Ada] Implement new legality rules introduced in C.6(13) by AI12-0128

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

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.

From-SVN: r279412
gcc/ada/ChangeLog
gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
gcc/ada/freeze.adb
gcc/ada/gnat_rm.texi
gcc/ada/sem_ch12.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads