diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-08-22 22:54:02 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-09-03 10:16:15 +0200 |
commit | d7e110d8fa18f734058e73424c398d8c69fcb6b3 (patch) | |
tree | 31f3c01d2602ad6e320ab05c6b221a37c43dcb18 /gcc/tree-pass.h | |
parent | e083e728668c7aba698fd846767feeeefbd99506 (diff) | |
download | gcc-d7e110d8fa18f734058e73424c398d8c69fcb6b3.zip gcc-d7e110d8fa18f734058e73424c398d8c69fcb6b3.tar.gz gcc-d7e110d8fa18f734058e73424c398d8c69fcb6b3.tar.bz2 |
ada: Do not warn for partial access to Atomic Volatile_Full_Access objects
The initial implementation of the GNAT aspect/pragma Volatile_Full_Access
made it incompatible with Atomic, because it was not decided whether the
read-modify-write sequences generated by Volatile_Full_Access would need
to be implemented atomically when Atomic was also specified, which would
have required a compare-and-swap primitive from the target architecture.
But Ada 2022 introduced Full_Access_Only and retrofitted it into Atomic
in the process, answering the above question by the negative, so the
incompatibility between Volatile_Full_Access and Atomic was lifted in
Ada 2012 as well, but the implementation was not entirely adjusted.
In Ada 2012, it does not make sense to warn for the partial access to an
Atomic object if the object is also declared Volatile_Full_Access, since
the object will be accessed as a whole in this case (like in Ada 2022).
gcc/ada/
* sem_res.adb (Is_Atomic_Ref_With_Address): Rename into...
(Is_Atomic_Non_VFA_Ref_With_Address): ...this and adjust the
implementation to exclude Volatile_Full_Access objects.
(Resolve_Indexed_Component): Adjust to above renaming.
(Resolve_Selected_Component): Likewise.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions