aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-02-17 09:21:58 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-02-17 09:21:58 +0000
commite2f0522e06523c19b62d1acc9925a63401c82b63 (patch)
tree862c4536dcd6f54e1fa80604d57c816ab0b1ed03 /gcc/ada/gcc-interface/trans.c
parentbf17fe3f736580a65427cc9e0e814e3ffe6e7fe5 (diff)
downloadgcc-e2f0522e06523c19b62d1acc9925a63401c82b63.zip
gcc-e2f0522e06523c19b62d1acc9925a63401c82b63.tar.gz
gcc-e2f0522e06523c19b62d1acc9925a63401c82b63.tar.bz2
exp_ch4.adb (Expand_N_Indexed_Component): Active synchronization if the prefix denotes an entity which Has_Atomic_Components.
* exp_ch4.adb (Expand_N_Indexed_Component): Active synchronization if the prefix denotes an entity which Has_Atomic_Components. * gcc-interface/trans.c (node_is_atomic): Return true if the prefix denotes an entity which Has_Atomic_Components. From-SVN: r233485
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 0f626d4..fce3f0e 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -4028,6 +4028,9 @@ node_is_atomic (Node_Id gnat_node)
case N_Indexed_Component:
if (Has_Atomic_Components (Etype (Prefix (gnat_node))))
return true;
+ if (Is_Entity_Name (Prefix (gnat_node))
+ && Has_Atomic_Components (Entity (Prefix (gnat_node))))
+ return true;
/* ... fall through ... */