diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-04 20:32:54 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-04 20:32:54 +0000 |
commit | d5e6c52cd374d98a13f770ce89316f64e20919f7 (patch) | |
tree | f0074a57080639b6427cbe8b7efedfac2672ead1 | |
parent | 5462d084879de707cfacf500a58942a2f157d5b5 (diff) |
* gnat.dg/slice9.adb: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@229779 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/slice9.adb | 18 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 40a5dd2ef8a..1733e60e691 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 00000000000..2a90a9c631c --- /dev/null +++ b/gcc/testsuite/gnat.dg/slice9.adb @@ -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; |