summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/slice2.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/slice2.adb')
-rw-r--r--gcc/testsuite/gnat.dg/slice2.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/slice2.adb b/gcc/testsuite/gnat.dg/slice2.adb
new file mode 100644
index 000000000..ab7307431
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/slice2.adb
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+package body Slice2 is
+
+ function F (I : R1) return R2 is
+ Val : R2;
+ begin
+ Val.Text (1 .. 8) := I.Text (1 .. 8);
+ return Val;
+ end F;
+
+end Slice2;