summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-22 12:53:21 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-22 12:53:21 +0000
commit2fe893b952031310e96bba64f19bf6530fd2b2e3 (patch)
treeb66b44d98a027fc0c33dc1f86e1a61404d3d06d2 /gcc/ada/sem_util.adb
parent36625869d3f0688597d79eed21cbb7459d70c0e7 (diff)
downloadgcc-2fe893b952031310e96bba64f19bf6530fd2b2e3.tar.gz
2015-05-22 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb, freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb, exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general change that deals with the fact that most of the special coding for Atomic should also apply to the case of Volatile_Full_Access. A new attribute Is_Atomic_Or_VFA is introduced, and many of the references to Is_Atomic now use this new attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index d1f222eec1c..13882676443 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -10276,6 +10276,20 @@ package body Sem_Util is
end if;
end Is_Atomic_Object;
+ -----------------------------
+ -- Is_Atomic_Or_VFA_Object --
+ -----------------------------
+
+ function Is_Atomic_Or_VFA_Object (N : Node_Id) return Boolean is
+ begin
+ return Is_Atomic_Object (N)
+ or else (Is_Object_Reference (N)
+ and then Is_Entity_Name (N)
+ and then (Has_Volatile_Full_Access (Entity (N))
+ or else
+ Has_Volatile_Full_Access (Etype (Entity (N)))));
+ end Is_Atomic_Or_VFA_Object;
+
-------------------------
-- Is_Attribute_Result --
-------------------------