From 1df4f514fac3b17c52bb283fcc52daf3d19c26e7 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 29 Aug 2011 16:32:43 +0200 Subject: [multiple changes] 2011-08-29 Robert Dewar * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting. 2011-08-29 Thomas Quinot * 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 * 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 * 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 * a-coorse.adb: Proper handling of empty ordered sets. From-SVN: r178249 --- gcc/ada/sem_ch10.adb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gcc/ada/sem_ch10.adb') 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 -- cgit v1.1