From d306cbee92c9e9dc2bb4f4d013b713f2588a23e0 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 4 Nov 2011 12:04:55 +0000 Subject: 2011-11-04 Robert Dewar * exp_ch2.adb (Expand_Entity_Reference): Do not set Atomic_Sync_Required for the case of a prefix of an attribute. * exp_ch4.adb (Expand_N_Explicit_Dereference): May require atomic synchronization (Expand_N_Indexed_Component): Ditto. (Expand_B_Selected_Component): Ditto. * sem_prag.adb (Process_Suppress_Unsuppress): Disable/Enable_Atomic_Synchronization can now occur for array types with pragma Atomic_Components. * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on N_Explicit_Dereference nodes and on N_Indexed_Component nodes. 2011-11-04 Gary Dismukes * gnat_ugn.texi: Editorial corrections for gnattest section. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180943 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/sinfo.ads | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sinfo.ads') diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 0b5a52f5dc7..dce0c2d4c2d 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -609,7 +609,13 @@ package Sinfo is -- This flag is set in an identifier or expanded name node if the -- corresponding reference (or assignment when on the left side of -- an assignment) requires atomic synchronization, as a result of - -- Atomic_Synchronization being enabled for the corresponding entity. + -- Atomic_Synchronization being enabled for the corresponding entity + -- or its type. Also set for Selector_Name of an N_Selected Component + -- node if the type is atomic and requires atomic synchronization. + -- Also set on an N_Explicit Dereference node if the resulting type + -- is atomic and requires atomic synchronization. Finally it is set + -- on an N_Indexed_Component node if the resulting type is Atomic, or + -- if the array type or the array has pragma Atomic_Components set. -- At_End_Proc (Node1) -- This field is present in an N_Handled_Sequence_Of_Statements node. @@ -3175,6 +3181,7 @@ package Sinfo is -- Sloc points to ALL -- Prefix (Node3) -- Actual_Designated_Subtype (Node4-Sem) + -- Atomic_Sync_Required (Flag14-Sem) -- plus fields for expression ------------------------------- @@ -3197,6 +3204,7 @@ package Sinfo is -- Sloc contains a copy of the Sloc value of the Prefix -- Prefix (Node3) -- Expressions (List1) + -- Atomic_Sync_Required (Flag14-Sem) -- plus fields for expression -- Note: if any of the subscripts requires a range check, then the -- cgit v1.2.1 From b444f81d4fd636a38e26b5afa56a247eedd17ca3 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 4 Nov 2011 13:48:52 +0000 Subject: 2011-11-04 Yannick Moy * sem_prag.adb: Minor refactoring (renaming of a parameter). 2011-11-04 Robert Dewar * atree.ads: Minor reformatting. 2011-11-04 Robert Dewar * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d and -gnatd.e here * exp_ch2.adb (Expand_Entity_Reference): Use Activate_Atomic_Synchronization * exp_ch4.adb (Expand_N_Explicit_Dereference): Use Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent): Activate_Atomic_Synchronization (Expand_N_Selected_Component): Use Activate_Atomic_Synchronization * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New procedure. * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to N_Selected_Component node git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180950 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/sinfo.ads | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'gcc/ada/sinfo.ads') diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index dce0c2d4c2d..35a73f9ad94 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -606,16 +606,8 @@ package Sinfo is -- harmless. -- Atomic_Sync_Required (Flag14-Sem) - -- This flag is set in an identifier or expanded name node if the - -- corresponding reference (or assignment when on the left side of - -- an assignment) requires atomic synchronization, as a result of - -- Atomic_Synchronization being enabled for the corresponding entity - -- or its type. Also set for Selector_Name of an N_Selected Component - -- node if the type is atomic and requires atomic synchronization. - -- Also set on an N_Explicit Dereference node if the resulting type - -- is atomic and requires atomic synchronization. Finally it is set - -- on an N_Indexed_Component node if the resulting type is Atomic, or - -- if the array type or the array has pragma Atomic_Components set. + -- This flag is set on a node for which atomic synchronization is + -- required for the corresponding reference or modification. -- At_End_Proc (Node1) -- This field is present in an N_Handled_Sequence_Of_Statements node. @@ -3248,6 +3240,7 @@ package Sinfo is -- Associated_Node (Node4-Sem) -- Do_Discriminant_Check (Flag13-Sem) -- Is_In_Discriminant_Check (Flag11-Sem) + -- Atomic_Sync_Required (Flag14-Sem) -- plus fields for expression -------------------------- -- cgit v1.2.1