aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/constant3.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gnat.dg/constant3.adb')
-rw-r--r--gcc-4.9/gcc/testsuite/gnat.dg/constant3.adb21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gnat.dg/constant3.adb b/gcc-4.9/gcc/testsuite/gnat.dg/constant3.adb
new file mode 100644
index 000000000..5ca1792fb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gnat.dg/constant3.adb
@@ -0,0 +1,21 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with System.Machine_code; use System.Machine_code;
+
+procedure Constant3 is
+
+ c : Integer := -1;
+ r : Integer;
+
+ procedure Conv (res : out Integer; v : Integer) is
+ v1 : constant Integer := v;
+ begin
+ Asm ("", Integer'Asm_output ("=m", res), Integer'Asm_input("m", v1));
+ end;
+
+ pragma Inline_Always (Conv);
+
+begin
+ Conv (r, c);
+end;