aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-4.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-4.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-4.c b/gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-4.c
new file mode 100644
index 000000000..743e8dc54
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-4.c
@@ -0,0 +1,18 @@
+/* Check that loads/stores from/to volatile floating point mems utilize
+ indexed addressing modes. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "@\\(r0," 2 } } */
+
+float
+test_00 (volatile float* x, unsigned int y)
+{
+ return x[y];
+}
+
+void
+test_100 (volatile float* x, unsigned int y, float z)
+{
+ x[y] = z;
+}