summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch8.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-05-22 10:52:17 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-05-22 10:52:17 +0200
commit6333ad3d459e4734c0cec7eb4e2c89097c9a1466 (patch)
tree2e94024e05c74b0b303ac3cd026f30894f78ab05 /gcc/ada/sem_ch8.adb
parent44ae5cd22f30de0a65c3a81ea146a85f07f33013 (diff)
downloadgcc-6333ad3d459e4734c0cec7eb4e2c89097c9a1466.tar.gz
[multiple changes]
2015-05-21 Robert Dewar <dewar@adacore.com> * exp_util.adb (Activate_Atomic_Synchronization): Do not set Atomic_Sync_Required for an object renaming declaration. * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and Is_Independent to renaming object. 2015-05-21 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose various illegalities in iterators over arrays and containers: a) New function Get_Cursor_Type, to verify that the cursor is not a limited type at the point of iteration. b) If the container is a constant, an element_iterator is illegal if the container type does not have a Constant_Indexing aspect. c) If the iterate function has an in-out controlling parameter, the container cannot be a constant object. d) Reject additional cases of iterators over a discriminant-dependent component of a mutable object. From-SVN: r223524
Diffstat (limited to 'gcc/ada/sem_ch8.adb')
-rw-r--r--gcc/ada/sem_ch8.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 9c564dd98e4..c8c9f1f56dc 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -1344,6 +1344,13 @@ package body Sem_Ch8 is
Set_Is_Volatile (Id, Is_Volatile_Object (Nam));
+ -- Also copy settings of Is_Atomic and Is_Independent
+
+ if Is_Entity_Name (Nam) then
+ Set_Is_Atomic (Id, Is_Atomic (Entity (Nam)));
+ Set_Is_Independent (Id, Is_Independent (Entity (Nam)));
+ end if;
+
-- Treat as volatile if we just set the Volatile flag
if Is_Volatile (Id)