summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-17 16:09:11 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-17 16:09:11 +0000
commitab291babb48cd807ff8b14a4e9b582b1a997568f (patch)
tree595ec323529782b06dead213612ac6f6707b874d /gcc/ada/exp_ch6.adb
parenta2d3b39c41ebc8912f3df4942d3b1b456d0b46fa (diff)
downloadgcc-ab291babb48cd807ff8b14a4e9b582b1a997568f.tar.gz
2006-02-17 Ramon Fernandez <fernandez@adacore.com>
Thomas Quinot <quinot@adacore.com> Robert Dewar <dewar@adacore.com> Javier Miranda <miranda@adacore.com> * expander.adb: Fix typo in comment * exp_pakd.adb: Fix typo Minor comment reformatting. * g-dyntab.adb: Minor reformatting * exp_ch6.adb (Register_Interface_DT_Entry): Traverse the list of aliased subprograms to look for the abstract interface subprogram. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r--gcc/ada/exp_ch6.adb14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index c42b1f3c6cf..304919fb190 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -4404,6 +4404,7 @@ package body Exp_Ch6 is
(Prim : Entity_Id;
Ancestor_Iface_Prim : Entity_Id := Empty)
is
+ E : Entity_Id;
Prim_Typ : Entity_Id;
Prim_Op : Entity_Id;
Iface_Typ : Entity_Id;
@@ -4422,7 +4423,18 @@ package body Exp_Ch6 is
if No (Ancestor_Iface_Prim) then
Prim_Typ := Scope (DTC_Entity (Alias (Prim)));
- Iface_Typ := Scope (DTC_Entity (Abstract_Interface_Alias (Prim)));
+
+ -- Look for the abstract interface subprogram
+
+ E := Abstract_Interface_Alias (Prim);
+ while Present (E)
+ and then Is_Abstract (E)
+ and then not Is_Interface (Scope (DTC_Entity (E)))
+ loop
+ E := Alias (E);
+ end loop;
+
+ Iface_Typ := Scope (DTC_Entity (E));
-- Generate the code of the thunk only when this primitive
-- operation is associated with a secondary dispatch table.