diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg/specs/uc1.ads')
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/uc1.ads | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/uc1.ads b/gcc/testsuite/gnat.dg/specs/uc1.ads new file mode 100644 index 000000000..299782035 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/uc1.ads @@ -0,0 +1,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; |