aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/restrict.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-17 11:57:27 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-17 11:57:27 +0200
commitbf327c92ead248cae1afba338d72bb7116dfc783 (patch)
tree56bb55c5ed960e6123da600a44f94e66b80ba0ea /gcc/ada/restrict.adb
parentffec8e81da21c8fd1726d4e5dbf4800aa0fe9e88 (diff)
downloadgcc-bf327c92ead248cae1afba338d72bb7116dfc783.zip
gcc-bf327c92ead248cae1afba338d72bb7116dfc783.tar.gz
gcc-bf327c92ead248cae1afba338d72bb7116dfc783.tar.bz2
[multiple changes]
2009-04-17 Thomas Quinot <quinot@adacore.com> * exp_ch7.adb: Minor reformatting 2009-04-17 Robert Dewar <dewar@adacore.com> * restrict.adb (Check_Restriction_No_Dependence): Don't check restriction if outside main extended source unit. * sem_ch10.adb (Analyze_With_Clause): Check No_Dependence restriction for parents of child units as well as the child unit itself. 2009-04-17 Bob Duff <duff@adacore.com> * checks.ads: Minor comment fix * exp_aggr.ads: Minor comment fix 2009-04-17 Nicolas Roche <roche@adacore.com> * adaint.c: Improve cross compiler detection and handling. From-SVN: r146236
Diffstat (limited to 'gcc/ada/restrict.adb')
-rw-r--r--gcc/ada/restrict.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index c883e0a..a57ac4c 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -316,6 +316,15 @@ package body Restrict is
DU : Node_Id;
begin
+ -- Ignore call if node U is not in the main source unit. This avoids
+ -- cascaded errors, e.g. when Ada.Containers units with other units.
+
+ if not In_Extended_Main_Source_Unit (U) then
+ return;
+ end if;
+
+ -- Loop through entries in No_Dependence table to check each one in turn
+
for J in No_Dependence.First .. No_Dependence.Last loop
DU := No_Dependence.Table (J).Unit;