From 12b4d3382209eb2c5248d8ce32b94d798acb0d0a Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 24 Oct 2011 11:51:42 +0200 Subject: [multiple changes] 2011-10-24 Ed Schonberg * sem_ch12.adb (Earlier): make available globally. If both nodes have the same sloc, the freeze node that does not come from source is the later one. (True_Parent): Make available globally. (Previous_Instance): Subsidiary of Insert_Freeze_Node_For_Instance, to check whether the generic parent of the current instance is declared within a previous instance in the same unit or declarative part, in which case the freeze nodes of both instances must appear in order to prevent elaboration problems in gigi. * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a freeze point, and the freeze node of a preceding instantiation must be inserted before it. 2011-10-24 Robert Dewar * checks.ads, checks.adb: Add handling of Synchronization_Check * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable atomic sync). * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required flag Minor code reorganization. * opt.ads (Warn_On_Atomic_Synchronization): New switch. * par-prag.adb: Add dummy entries for pragma Disable/Enable_Atomic_Synchronization. * sem_prag.adb (Process_Suppress_Unsuppress): Handle case of Atomic_Synchronization specially (not suppressed by All_Checks, cannot be set from Source). (Pragma Disable/Enable_Atomic_Synchronization): Add processing. * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag * snames.ads-tmpl: Add entry for Atomic_Synchronization Add entry for pragma Disable/Enable_Atomic_Synchronization * switch-c.adb: The -gnatp switch does not disable Atomic_Synchronization Add -gnatep switch to disable Atomic_Synchronization. * types.ads: Add entry for Synchronization_Check * usage.adb: Add line for -gnated switch * warnsw.adb: Settings for Warn_On_Atomic_Synchronization From-SVN: r180373 --- gcc/ada/switch-c.adb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc/ada/switch-c.adb') diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 58d4e13..e900faa 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -440,6 +440,11 @@ package body Switch.C is -- Ptr := Ptr + 1; -- Generate_SCIL := True; + -- -gnated switch (disable atomic synchronization) + + when 'd' => + Suppress_Options (Atomic_Synchronization) := True; + -- -gnateD switch (preprocessing symbol definition) when 'D' => @@ -743,10 +748,14 @@ package body Switch.C is -- Set all specific options as well as All_Checks in the -- Suppress_Options array, excluding Elaboration_Check, -- since this is treated specially because we do not want - -- -gnatp to disable static elaboration processing. + -- -gnatp to disable static elaboration processing. Also + -- exclude Atomic_Synchronization, since this is not a real + -- check. for J in Suppress_Options'Range loop - if J /= Elaboration_Check then + if J /= Elaboration_Check + and then J /= Atomic_Synchronization + then Suppress_Options (J) := True; end if; end loop; -- cgit v1.1