Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gnat.dg / specs / uc1.ads
blob2997820355ef8af93901d0b8b4c50bbbd076d688
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
4 with System;
5 with System.Storage_Elements;
6 with Unchecked_Conversion;
8 package UC1 is
10 function Conv is
11 new Unchecked_Conversion (Source => System.Address, Target => Integer);
12 function Conv is
13 new Unchecked_Conversion (Source => Integer, Target => System.Address);
15 M : constant System.Address := System.Storage_Elements.To_Address(0);
16 N : constant System.Address := Conv (Conv (M) + 1);
17 A : constant System.Address := Conv (Conv (N) + 1);
19 I : Integer;
20 for I use at A;
22 end UC1;