summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/concat_length.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/concat_length.adb')
-rw-r--r--gcc/testsuite/gnat.dg/concat_length.adb15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/concat_length.adb b/gcc/testsuite/gnat.dg/concat_length.adb
new file mode 100644
index 000000000..fe482d98d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/concat_length.adb
@@ -0,0 +1,15 @@
+-- { dg-do run }
+
+procedure Concat_Length is
+ type Byte is mod 256;
+ for Byte'Size use 8;
+ type Block is array(Byte range <>) of Integer;
+
+ C0: Block(1..7) := (others => 0);
+ C1: Block(8..255) := (others => 0);
+ C2: Block := C0 & C1;
+begin
+ if C2'Length /= 255 then
+ raise Program_Error;
+ end if;
+end;