aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/arm/asm.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/asm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/arm/asm.c b/gcc-4.9/gcc/testsuite/gcc.target/arm/asm.c
new file mode 100644
index 000000000..452ebf4de
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/arm/asm.c
@@ -0,0 +1,13 @@
+/* ARM and Thumb asm statements should be able to access the constant
+ pool. */
+/* { dg-do compile } */
+extern unsigned x[];
+unsigned *trapTable()
+{
+ unsigned *i;
+
+ __asm__ volatile("ldr %0,%1" : "=r"(i) : "m"(x[0]));
+
+ return i;
+}
+