Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gnat.dg / addr6.adb
blobe357132d66f0cb9cebca747e3286246721ff5068
1 -- { dg-do compile }
3 procedure Addr6 is
5 type Byte is mod 2**8;
7 type Byte_Arr1 is array (Positive range <>) of Byte;
8 for Byte_Arr1'Alignment use 4;
10 type Byte_Arr2 is array (Positive range <>) of Byte;
12 function Length return Natural is
13 begin
14 return 1;
15 end;
17 function Empty return Byte_Arr2 is
18 Null_Arr : Byte_Arr2 (1 .. 0);
19 begin
20 return Null_Arr;
21 end;
23 A1 : Byte_Arr1 (1 .. Length);
25 A2 : Byte_Arr2 (A1'Range);
26 for A2'Alignment use 4;
27 for A2'Address use A1'Address;
29 begin
30 A2 := Empty;
31 end;