summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/deferred_const1.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/deferred_const1.adb')
-rw-r--r--gcc/testsuite/gnat.dg/deferred_const1.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/deferred_const1.adb b/gcc/testsuite/gnat.dg/deferred_const1.adb
new file mode 100644
index 000000000..79b9f4a03
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/deferred_const1.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+
+with Text_IO; use Text_IO;
+
+procedure Deferred_Const1 is
+ I : Integer := 16#20_3A_2D_28#;
+ S : constant string(1..4);
+ for S'address use I'address; -- { dg-warning "constant overlays a variable" }
+ pragma Import (Ada, S);
+begin
+ Put_Line (S);
+end;