summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_disp.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 07:38:45 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 07:38:45 +0000
commit79a7272863d6a144007c2e2fefed7eb2083e29ec (patch)
tree6e16832563563534e0f688b23dea98c61d508643 /gcc/ada/exp_disp.adb
parentaea95c8537856cb272eef19f04b181eeb1a88008 (diff)
downloadgcc-79a7272863d6a144007c2e2fefed7eb2083e29ec.tar.gz
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): If the target type is a tagged synchronized type, use corresponding record type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138463 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_disp.adb')
-rw-r--r--gcc/ada/exp_disp.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index ac25171abf7..461edc75a3d 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -766,6 +766,13 @@ package body Exp_Disp is
Iface_Typ := Root_Type (Iface_Typ);
end if;
+ -- If the target type is a tagged synchronized type, the dispatch table
+ -- info is in the correspondoing record type.
+
+ if Is_Concurrent_Type (Iface_Typ) then
+ Iface_Typ := Corresponding_Record_Type (Iface_Typ);
+ end if;
+
pragma Assert (not Is_Static
or else (not Is_Class_Wide_Type (Iface_Typ)
and then Is_Interface (Iface_Typ)));