aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2007-12-19 17:23:21 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2007-12-19 17:23:21 +0100
commit5be0911d7d9b51b04b2ef5cf9c925211c3733694 (patch)
tree8ebfd01d65bc106f6e29ebd6dda6aa14438e1dc8 /gcc
parentcf284c756a3e6bb36b74c61c5791f28724ed744b (diff)
downloadgcc-5be0911d7d9b51b04b2ef5cf9c925211c3733694.zip
gcc-5be0911d7d9b51b04b2ef5cf9c925211c3733694.tar.gz
gcc-5be0911d7d9b51b04b2ef5cf9c925211c3733694.tar.bz2
exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry that forces the construction of static dispatch tables...
2007-12-19 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry that forces the construction of static dispatch tables in case of record subtypes. From-SVN: r131073
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_ch3.adb17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index eae2c2f..fcc216e2 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -4051,6 +4051,7 @@ package body Exp_Ch3 is
Expr : constant Node_Id := Expression (N);
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (Def_Id);
+ Base_Typ : constant Entity_Id := Base_Type (Typ);
Expr_Q : Node_Id;
Id_Ref : Node_Id;
New_Ref : Node_Id;
@@ -4075,20 +4076,20 @@ package body Exp_Ch3 is
if VM_Target = No_VM
and then Static_Dispatch_Tables
and then Is_Library_Level_Entity (Def_Id)
- and then Is_Library_Level_Tagged_Type (Typ)
- and then (Ekind (Typ) = E_Record_Type
- or else Ekind (Typ) = E_Protected_Type
- or else Ekind (Typ) = E_Task_Type)
- and then not Has_Dispatch_Table (Typ)
+ and then Is_Library_Level_Tagged_Type (Base_Typ)
+ and then (Ekind (Base_Typ) = E_Record_Type
+ or else Ekind (Base_Typ) = E_Protected_Type
+ or else Ekind (Base_Typ) = E_Task_Type)
+ and then not Has_Dispatch_Table (Base_Typ)
then
declare
New_Nodes : List_Id := No_List;
begin
- if Is_Concurrent_Type (Typ) then
- New_Nodes := Make_DT (Corresponding_Record_Type (Typ), N);
+ if Is_Concurrent_Type (Base_Typ) then
+ New_Nodes := Make_DT (Corresponding_Record_Type (Base_Typ), N);
else
- New_Nodes := Make_DT (Typ, N);
+ New_Nodes := Make_DT (Base_Typ, N);
end if;
if not Is_Empty_List (New_Nodes) then