diff options
author | Rafael Espindola <espindola@google.com> | 2009-04-20 14:09:46 +0000 |
---|---|---|
committer | Rafael Espindola <espindola@google.com> | 2009-04-20 14:09:46 +0000 |
commit | ee7d4fba3eb1fe0ef18f4badf1fd71100c99309c (patch) | |
tree | 9c8d314cc606457ab4eb9ddec739f1c5d2c92008 /gcc/testsuite/gnat.dg/rep_clause3.adb | |
parent | 20ccb780d272cc40cbb95191d5adf63bd7aa4842 (diff) |
2009-04-20 Rafael Avila de Espindola <espindola@google.com>plugins
Merge with mainline @146369.
* configure.ac (ACX_PKGVERSION): Update.
* configure: Regenerate.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/plugins@146426 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/rep_clause3.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/rep_clause3.adb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/rep_clause3.adb b/gcc/testsuite/gnat.dg/rep_clause3.adb new file mode 100644 index 00000000000..f4adcc37bf6 --- /dev/null +++ b/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; |