1-- { dg-do compile } 2-- { dg-options "-gnatws" } 3 4procedure Rep_Clause3 is 5 6 subtype U_16 is integer range 0..2**16-1; 7 8 type TYPE1 is range 0 .. 135; 9 for TYPE1'size use 14; 10 11 type TYPE2 is range 0 .. 262_143; 12 for TYPE2'size use 18; 13 14 subtype TYPE3 is integer range 1 .. 21*6; 15 16 type ARR is array (TYPE3 range <>) of boolean; 17 pragma Pack(ARR); 18 19 subtype SUB_ARR is ARR(1 .. 5*6); 20 21 OBJ : SUB_ARR; 22 23 type R is 24 record 25 N : TYPE1; 26 L : TYPE2; 27 I : SUB_ARR; 28 CRC : U_16; 29 end record; 30 for R use 31 record at mod 4; 32 N at 0 range 0 .. 13; 33 L at 0 range 14 .. 31; 34 I at 4 range 2 .. 37; 35 CRC at 8 range 16 .. 31; 36 end record; 37 for R'size use 12*8; 38 39 type SUB_R is array (1..4) of R; 40 41 T : SUB_R; 42 43begin 44 if OBJ = T(1).I then 45 raise Program_Error; 46 end if; 47end; 48