* gnat.dg/interface5.ad[sb]: New test.
authorArnaud Charlet <charlet@adacore.com>
Tue, 27 May 2008 09:30:35 +0000 (09:30 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 May 2008 09:30:35 +0000 (11:30 +0200)
From-SVN: r135995

gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/interface5.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/interface5.ads [new file with mode: 0644]

index 6bb5bc41fb54208d7aee2c7c731abd41c93467c9..a34e1a19b56f77b0d6204eeaab1f3b249c167847 100644 (file)
@@ -1,6 +1,7 @@
 2008-05-27  Arnaud Charlet  <charlet@adacore.com>
 
        * gnat.dg/sync1.ad[sb]: New test.
+       * gnat.dg/interface5.ad[sb]: New test.
 
 2008-05-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
diff --git a/gcc/testsuite/gnat.dg/interface5.adb b/gcc/testsuite/gnat.dg/interface5.adb
new file mode 100644 (file)
index 0000000..80d240a
--- /dev/null
@@ -0,0 +1,7 @@
+--  { dg-do compile }
+package body interface5 is
+   function F (Object : Child) return access Child is
+   begin
+      return null;
+   end F;
+end interface5;
diff --git a/gcc/testsuite/gnat.dg/interface5.ads b/gcc/testsuite/gnat.dg/interface5.ads
new file mode 100644 (file)
index 0000000..e1bd0ba
--- /dev/null
@@ -0,0 +1,9 @@
+package interface5 is
+   type B is tagged null record;
+   
+   type I is interface;
+   function F (Object : I) return access I is abstract;
+   
+   type Child is new B and I with null record;
+   function F (Object : Child) return access Child;
+end interface5;