1-- { dg-do compile } 2 3procedure Addr6 is 4 5 type Byte is mod 2**8; 6 7 type Byte_Arr1 is array (Positive range <>) of Byte; 8 for Byte_Arr1'Alignment use 4; 9 10 type Byte_Arr2 is array (Positive range <>) of Byte; 11 12 function Length return Natural is 13 begin 14 return 1; 15 end; 16 17 function Empty return Byte_Arr2 is 18 Null_Arr : Byte_Arr2 (1 .. 0); 19 begin 20 return Null_Arr; 21 end; 22 23 A1 : Byte_Arr1 (1 .. Length); 24 25 A2 : Byte_Arr2 (A1'Range); 26 for A2'Alignment use 4; 27 for A2'Address use A1'Address; 28 29begin 30 A2 := Empty; 31end; 32