re PR middle-end/89544 (Argument marshalling incorrectly assumes stack slots are...
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 28 Aug 2019 10:20:44 +0000 (10:20 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Wed, 28 Aug 2019 10:20:44 +0000 (10:20 +0000)
2019-08-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/89544
        * gcc.target/arm/unaligned-argument-3.c: New test.

From-SVN: r274987

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/unaligned-argument-3.c [new file with mode: 0644]

index 4c58780ff67b8ba0816bd24a6b5bd8473ff2f9dd..333fe3cdea2e04833d3e9209ca1aa94c24da4137 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       PR middle-end/89544
+       * gcc.target/arm/unaligned-argument-3.c: New test.
+
 2019-08-27  Marek Polacek  <polacek@redhat.com>
 
        PR c++/81676 - bogus -Wunused warnings in constexpr if.
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-argument-3.c b/gcc/testsuite/gcc.target/arm/unaligned-argument-3.c
new file mode 100644 (file)
index 0000000..2543038
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arm_ok } */
+/* { dg-options "-marm -mno-unaligned-access -O3" } */
+
+typedef int __attribute__((aligned(1))) s;
+
+void x(char*, s*);
+void f(char a, s f)
+{
+  x(&a, &f);
+}
+
+/* { dg-final { scan-assembler-times "str\t\[^\\n\]*\\\[sp\\\]" 1 } } */
+/* { dg-final { scan-assembler-times "str\t\[^\\n\]*\\\[sp, #3\\\]" 0 } } */