aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 16:32:43 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 16:32:43 +0200
commit1df4f514fac3b17c52bb283fcc52daf3d19c26e7 (patch)
tree5b0e00002daef44290edd3196cd25f963c17a158 /gcc/ada/sem_ch10.adb
parent14f0f659acfb490fc37e1a9de8f19c4759845337 (diff)
downloadgcc-1df4f514fac3b17c52bb283fcc52daf3d19c26e7.zip
gcc-1df4f514fac3b17c52bb283fcc52daf3d19c26e7.tar.gz
gcc-1df4f514fac3b17c52bb283fcc52daf3d19c26e7.tar.bz2
[multiple changes]
2011-08-29 Robert Dewar <dewar@adacore.com> * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting. 2011-08-29 Thomas Quinot <quinot@adacore.com> * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple values, we generate multiple triples of parameters in the TypeCode. Bump Choice_Index for each such triple so that a subsequent default choice is associated with the correct index in the typecode. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * a-cdlili.adb (Iterate): Initialize properly an iterator over a null container. (First, Last): Handle properly an iterator over a null container. 2011-08-29 Bob Duff <duff@adacore.com> * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon processing if we run across a node with no Scope. This can happen if we're with-ing an library-level instance, and that instance got errors that caused "instantiation abandoned". * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising an exception instead of using Assert, so it won't go into an infinite loop, even when assertions are turned off. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * a-coorse.adb: Proper handling of empty ordered sets. From-SVN: r178249
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 59ec7a4..2ab7084 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -2585,6 +2585,13 @@ package body Sem_Ch10 is
if Par_Name /= Standard_Standard then
Par_Name := Scope (Par_Name);
end if;
+
+ -- Abandon processing in case of previous errors
+
+ if No (Par_Name) then
+ pragma Assert (Serious_Errors_Detected /= 0);
+ return;
+ end if;
end loop;
if Present (Entity (Pref))
@@ -5034,6 +5041,13 @@ package body Sem_Ch10 is
("instantiation depends on itself", Name (With_Clause));
elsif not Is_Visible_Child_Unit (Uname) then
+ -- Abandon processing in case of previous errors
+
+ if No (Scope (Uname)) then
+ pragma Assert (Serious_Errors_Detected /= 0);
+ return;
+ end if;
+
Set_Is_Visible_Child_Unit (Uname);
-- If the child unit appears in the context of its parent, it is