summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/interface_conv.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/interface_conv.adb')
-rw-r--r--gcc/testsuite/gnat.dg/interface_conv.adb17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/interface_conv.adb b/gcc/testsuite/gnat.dg/interface_conv.adb
new file mode 100644
index 000000000..503fb7eaa
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/interface_conv.adb
@@ -0,0 +1,17 @@
+-- { dg-do run }
+
+procedure Interface_Conv is
+ package Pkg is
+ type I1 is interface;
+ procedure Prim (X : I1) is null;
+ type I2 is interface;
+ procedure Prim (X : I2) is null;
+ type DT is new I1 and I2 with null record;
+ end Pkg;
+ use Pkg;
+ Obj : DT;
+ CW_3 : I2'Class := Obj;
+ CW_5 : I1'Class := I1'Class (CW_3); -- test
+begin
+ null;
+end;