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