summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/abstract1.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/abstract1.ads')
-rw-r--r--gcc/testsuite/gnat.dg/abstract1.ads19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/abstract1.ads b/gcc/testsuite/gnat.dg/abstract1.ads
new file mode 100644
index 000000000..bad9ee698
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/abstract1.ads
@@ -0,0 +1,19 @@
+with Ada.Streams; use Ada.Streams;
+package abstract1 is
+ type T is abstract tagged limited null record;
+ function Input (Stream : not null access Root_Stream_Type'Class) return T
+ is abstract;
+
+ function New_T (Stream : not null access Root_Stream_Type'Class)
+ return T'Class;
+
+ type IT is limited new T with record
+ I : Integer;
+ end record;
+ function Input (Stream : not null access Root_Stream_Type'Class) return IT;
+
+ type FT is limited new T with record
+ F : Float;
+ end record;
+ function Input (Stream : not null access Root_Stream_Type'Class) return FT;
+end abstract1;