* gnat.dg/slice9.adb: New test.
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 4 Nov 2015 20:32:54 +0000 (20:32 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 4 Nov 2015 20:32:54 +0000 (20:32 +0000)
From-SVN: r229779

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

index 40a5dd2ef8aeb4023f96b98bd200fb4b846232e7..1733e60e6919e2689779a9f9d3632a6868f6385c 100644 (file)
@@ -1,3 +1,7 @@
+2015-11-04  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gnat.dg/slice9.adb: New test.
+
 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
 
        * gfortran.dg/goacc/reduction-2.f95: Delete.
@@ -8,10 +12,6 @@
        * gcc.dg/tree-ssa/restrict-7.c: New test.
        * gcc.dg/tree-ssa/restrict-8.c: New test.
 
-2015-11-04  Eric Botcazou  <ebotcazou@adacore.com>
-
-       * gnat.dg/slice9.adb: New test.
-
 2015-11-03  Martin Sebor  <msebor@redhat.com>
 
        PR c++-common/67882
diff --git a/gcc/testsuite/gnat.dg/slice9.adb b/gcc/testsuite/gnat.dg/slice9.adb
new file mode 100644 (file)
index 0000000..2a90a9c
--- /dev/null
@@ -0,0 +1,18 @@
+-- { dg-do compile }
+
+procedure Slice9 is
+
+  function Ident (I : Integer) return Integer is
+  begin
+    return I;
+  end;
+
+  subtype S is String (Ident(5)..Ident(9));
+
+  Dest : S;
+
+  Src : String (Ident(1)..Ident(5)) := "ABCDE";
+
+begin
+  Dest (Ident(5)..Ident(7)) := Src (Ident(1)..Ident(3));
+end;