aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index de5a8c8..45aabad 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -123,15 +123,6 @@ package body Sem_Ch10 is
-- Verify that a stub is declared immediately within a compilation unit,
-- and not in an inner frame.
- procedure Expand_With_Clause (Item : Node_Id; Nam : Node_Id; N : Node_Id);
- -- When a child unit appears in a context clause, the implicit withs on
- -- parents are made explicit, and with clauses are inserted in the context
- -- clause before the one for the child. If a parent in the with_clause
- -- is a renaming, the implicit with_clause is on the renaming whose name
- -- is mentioned in the with_clause, and not on the package it renames.
- -- N is the compilation unit whose list of context items receives the
- -- implicit with_clauses.
-
procedure Generate_Parent_References (N : Node_Id; P_Id : Entity_Id);
-- Generate cross-reference information for the parents of child units
-- and of subunits. N is a defining_program_unit_name, and P_Id is the
@@ -1234,9 +1225,15 @@ package body Sem_Ch10 is
if Expander_Active and then Tagged_Type_Expansion then
case Nkind (Unit_Node) is
- when N_Package_Declaration | N_Package_Body =>
+ when N_Package_Declaration =>
Build_Static_Dispatch_Tables (Unit_Node);
+ when N_Package_Body =>
+ if Ekind (Corresponding_Spec (Unit_Node)) /= E_Generic_Package
+ then
+ Build_Static_Dispatch_Tables (Unit_Node);
+ end if;
+
when N_Package_Instantiation =>
Build_Static_Dispatch_Tables (Instance_Spec (Unit_Node));
@@ -2955,6 +2952,7 @@ package body Sem_Ch10 is
if Ada_Version >= Ada_95
and then In_Predefined_Renaming (U)
+ and then Comes_From_Source (N)
then
if Restriction_Check_Required (No_Obsolescent_Features) then
Check_Restriction (No_Obsolescent_Features, N);
@@ -4932,6 +4930,8 @@ package body Sem_Ch10 is
if Entity (Name (Clause)) = Id
or else
(Nkind (Name (Clause)) = N_Expanded_Name
+ and then
+ Is_Entity_Name (Prefix (Name (Clause)))
and then Entity (Prefix (Name (Clause))) = Id)
then
return True;