Add new tests.
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Jun 2007 09:24:07 +0000 (09:24 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Jun 2007 09:24:07 +0000 (09:24 +0000)
git-svn-id: svn://gcc.gnu.org/svn/gcc/trunk@125702 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gnat.dg/interface4.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/quote.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/socket2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/str1.adb [new file with mode: 0644]

diff --git a/gcc/testsuite/gnat.dg/interface4.adb b/gcc/testsuite/gnat.dg/interface4.adb
new file mode 100644 (file)
index 0000000..8dde602
--- /dev/null
@@ -0,0 +1,13 @@
+--  { dg-do compile }
+
+procedure interface4 is
+     generic
+       type I1 is interface;
+       type I2 is limited interface;
+       type I3 is interface and I1;
+       type I4 is limited interface and I2;
+     package Pack_I is
+     end Pack_I;
+begin
+     null;
+end interface4;
diff --git a/gcc/testsuite/gnat.dg/quote.adb b/gcc/testsuite/gnat.dg/quote.adb
new file mode 100644 (file)
index 0000000..4b12c9f
--- /dev/null
@@ -0,0 +1,9 @@
+--  { dg-do run }
+
+with GNAT.Regpat; use GNAT.Regpat;
+procedure Quote is
+begin   
+  if Quote (".+") /= "\.\+" then
+     raise Program_Error;
+  end if;
+end Quote;
diff --git a/gcc/testsuite/gnat.dg/socket2.adb b/gcc/testsuite/gnat.dg/socket2.adb
new file mode 100644 (file)
index 0000000..8f58f3c
--- /dev/null
@@ -0,0 +1,14 @@
+--  { dg-do run }
+
+with GNAT.Sockets; use GNAT.Sockets;
+procedure socket2 is
+   X : Character;
+begin
+   X := 'x';
+   GNAT.Sockets.Initialize;
+   declare
+      H : Host_Entry_Type := Get_Host_By_Address (Inet_Addr ("127.0.0.1"));
+   begin
+      null;
+   end;
+end socket2;
diff --git a/gcc/testsuite/gnat.dg/str1.adb b/gcc/testsuite/gnat.dg/str1.adb
new file mode 100644 (file)
index 0000000..833d0f1
--- /dev/null
@@ -0,0 +1,20 @@
+--  { dg-do compile }
+
+procedure str1 is
+   Str : constant string := "--";
+   generic
+   package Gen is
+      procedure P;
+   end Gen;
+   package body Gen is
+      procedure P is
+         inner : String := Str;
+      begin
+         null;
+      end;
+   end Gen;
+   
+   package Inst is new Gen;
+begin
+   null;
+end;