summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs/uc1.ads
blob: 2997820355ef8af93901d0b8b4c50bbbd076d688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- { dg-do compile }
-- { dg-options "-gnatws" }

with System;
with System.Storage_Elements;
with Unchecked_Conversion;

package UC1 is

  function Conv is
    new Unchecked_Conversion (Source => System.Address, Target => Integer);
  function Conv is
    new Unchecked_Conversion (Source => Integer, Target => System.Address);

  M : constant System.Address := System.Storage_Elements.To_Address(0);
  N : constant System.Address := Conv (Conv (M) + 1);
  A : constant System.Address := Conv (Conv (N) + 1);

  I : Integer;
  for I use at A;

end UC1;