aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2007-08-31 12:23:59 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-31 12:23:59 +0200
commitc19d161545bb1c8c58dbc23b6f708b12403193f3 (patch)
treeeb4b86a7d19feae159234e59d049cafcdfc9a9f2 /gcc
parent1d7d0be618c69e8547b25c52069364ad5ceff6c4 (diff)
downloadgcc-c19d161545bb1c8c58dbc23b6f708b12403193f3.zip
gcc-c19d161545bb1c8c58dbc23b6f708b12403193f3.tar.gz
gcc-c19d161545bb1c8c58dbc23b6f708b12403193f3.tar.bz2
sem_ch10.adb (Analyze_Subunit_Context): When analyzing context clauses of subunits...
2007-08-31 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context clauses of subunits, ignore limited_with_clauses that are illegal and have not been fully analyzed. From-SVN: r127979
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch10.adb22
1 files changed, 14 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 14739b9..29d10de 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -1892,15 +1892,20 @@ package body Sem_Ch10 is
-- Protect frontend against previous errors in context clauses
if Nkind (Name (Item)) /= N_Selected_Component then
- Unit_Name := Entity (Name (Item));
- while Is_Child_Unit (Unit_Name) loop
- Set_Is_Visible_Child_Unit (Unit_Name);
- Unit_Name := Scope (Unit_Name);
- end loop;
+ if Error_Posted (Item) then
+ null;
+
+ else
+ Unit_Name := Entity (Name (Item));
+ while Is_Child_Unit (Unit_Name) loop
+ Set_Is_Visible_Child_Unit (Unit_Name);
+ Unit_Name := Scope (Unit_Name);
+ end loop;
- if not Is_Immediately_Visible (Unit_Name) then
- Set_Is_Immediately_Visible (Unit_Name);
- Set_Context_Installed (Item);
+ if not Is_Immediately_Visible (Unit_Name) then
+ Set_Is_Immediately_Visible (Unit_Name);
+ Set_Context_Installed (Item);
+ end if;
end if;
end if;
@@ -1932,6 +1937,7 @@ package body Sem_Ch10 is
-- Protect frontend against previous errors in context clauses
and then Nkind (Name (Item)) /= N_Selected_Component
+ and then not Error_Posted (Item)
then
Unit_Name := Entity (Name (Item));
while Is_Child_Unit (Unit_Name) loop