summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2019-09-03 14:37:41 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2019-09-03 14:37:41 +0000
commit934392185369af22fee845e4edd92c420b8c248b (patch)
treee13e59cecc7a4efdcf0a55187dcac5ea3900e569 /gcc/testsuite/gcc.target
parentc6c2d1bc9bc3eb3606af6a198e74170bd906e199 (diff)
downloadgcc-934392185369af22fee845e4edd92c420b8c248b.tar.gz
re PR middle-end/91603 (Unaligned access in expand_assignment)
2019-09-03 Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/91603 PR middle-end/91612 PR middle-end/91613 * expr.c (expand_expr_real_1): Handle unaligned decl_rtl and SSA_NAME referring to CONSTANT_P correctly. testsuite: 2019-09-03 Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/91603 * testsuite/gcc.target/arm/pr91603.c: New test. From-SVN: r275342
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/arm/pr91603.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/pr91603.c b/gcc/testsuite/gcc.target/arm/pr91603.c
new file mode 100644
index 00000000000..ab09c3bb925
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr91603.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O3" } */
+/* { dg-add-options arm_neon } */
+
+typedef __simd64_int32_t int32x2_t;
+typedef __attribute__((aligned (1))) int32x2_t unalignedvec;
+
+unalignedvec a = {11, 13};
+
+void foo(unalignedvec *);
+
+void test()
+{
+ unalignedvec x = a;
+ foo (&x);
+ a = x;
+}
+
+/* { dg-final { scan-assembler-times "vld1.32" 1 } } */
+/* { dg-final { scan-assembler-times "vst1.32" 1 } } */
+/* { dg-final { scan-assembler-times "vldr" 1 } } */
+/* { dg-final { scan-assembler-times "vstr" 1 } } */