summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/c_words.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/c_words.ads')
-rw-r--r--gcc/testsuite/gnat.dg/c_words.ads16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/c_words.ads b/gcc/testsuite/gnat.dg/c_words.ads
new file mode 100644
index 000000000..b87a19bb1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/c_words.ads
@@ -0,0 +1,16 @@
+package C_Words is
+ type Comparable is limited interface;
+
+ type Word (<>) is tagged private;
+ function New_Word (Str : String) return Word;
+
+ type C_Word (<>) is new Word and Comparable with private;
+ function New_Word (Str : String) return C_Word;
+
+private
+ type Word (Length : Natural) is tagged record
+ Str : String (1 .. Length) := (others => ' ');
+ end record;
+
+ type C_Word is new Word and Comparable with null record;
+end C_Words;