summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/dispatch2.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/dispatch2.adb')
-rw-r--r--gcc/testsuite/gnat.dg/dispatch2.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/dispatch2.adb b/gcc/testsuite/gnat.dg/dispatch2.adb
new file mode 100644
index 000000000..ed57b1335
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/dispatch2.adb
@@ -0,0 +1,10 @@
+-- { dg-do run }
+
+with dispatch2_p; use dispatch2_p;
+procedure dispatch2 is
+ Obj : Object_Ptr := new Object;
+begin
+ if Obj.Get_Ptr /= Obj.Impl_Of then
+ raise Program_Error;
+ end if;
+end;