aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2013-03-28 11:14:20 -0700
committerBen Cheng <bccheng@google.com>2013-03-28 12:40:33 -0700
commitaf0c51ac87ab2a87caa03fa108f0d164987a2764 (patch)
tree4b8b470f7c5b69642fdab8d0aa1fbc148d02196b /gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb
parentd87cae247d39ebf4f5a6bf25c932a14d2fdb9384 (diff)
downloadtoolchain_gcc-af0c51ac87ab2a87caa03fa108f0d164987a2764.tar.gz
toolchain_gcc-af0c51ac87ab2a87caa03fa108f0d164987a2764.tar.bz2
toolchain_gcc-af0c51ac87ab2a87caa03fa108f0d164987a2764.zip
[GCC 4.8] Initial check-in of GCC 4.8.0
Change-Id: I0719d8a6d0f69b367a6ab6f10eb75622dbf12771
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb')
-rw-r--r--gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb47
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb b/gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb
new file mode 100644
index 000000000..f4adcc37b
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gnat.dg/rep_clause3.adb
@@ -0,0 +1,47 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Rep_Clause3 is
+
+ subtype U_16 is integer range 0..2**16-1;
+
+ type TYPE1 is range 0 .. 135;
+ for TYPE1'size use 14;
+
+ type TYPE2 is range 0 .. 262_143;
+ for TYPE2'size use 18;
+
+ subtype TYPE3 is integer range 1 .. 21*6;
+
+ type ARR is array (TYPE3 range <>) of boolean;
+ pragma Pack(ARR);
+
+ subtype SUB_ARR is ARR(1 .. 5*6);
+
+ OBJ : SUB_ARR;
+
+ type R is
+ record
+ N : TYPE1;
+ L : TYPE2;
+ I : SUB_ARR;
+ CRC : U_16;
+ end record;
+ for R use
+ record at mod 4;
+ N at 0 range 0 .. 13;
+ L at 0 range 14 .. 31;
+ I at 4 range 2 .. 37;
+ CRC at 8 range 16 .. 31;
+ end record;
+ for R'size use 12*8;
+
+ type SUB_R is array (1..4) of R;
+
+ T : SUB_R;
+
+begin
+ if OBJ = T(1).I then
+ raise Program_Error;
+ end if;
+end;