aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2008-08-01 09:38:45 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-01 09:38:45 +0200
commit0f300ef506a9eb119d35435e7ba06cc8b4e22775 (patch)
tree6e16832563563534e0f688b23dea98c61d508643 /gcc
parent3d2e1f1213fad1866bce551467ec0a5054e49684 (diff)
downloadgcc-0f300ef506a9eb119d35435e7ba06cc8b4e22775.zip
gcc-0f300ef506a9eb119d35435e7ba06cc8b4e22775.tar.gz
gcc-0f300ef506a9eb119d35435e7ba06cc8b4e22775.tar.bz2
exp_disp.adb (Expand_Interface_Conversion): If the target type is a tagged synchronized type, use corresponding record type.
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. From-SVN: r138463
Diffstat (limited to 'gcc')
-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 ac25171..461edc7 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)));