From: Bernd Edlinger Date: Wed, 28 Aug 2019 10:20:44 +0000 (+0000) Subject: re PR middle-end/89544 (Argument marshalling incorrectly assumes stack slots are... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b778f9f4a9606cff7c9b9b8a923e17f291c527a;p=gcc.git re PR middle-end/89544 (Argument marshalling incorrectly assumes stack slots are naturally aligned.) 2019-08-28 Bernd Edlinger PR middle-end/89544 * gcc.target/arm/unaligned-argument-3.c: New test. From-SVN: r274987 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c58780ff67..333fe3cdea2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-08-28 Bernd Edlinger + + PR middle-end/89544 + * gcc.target/arm/unaligned-argument-3.c: New test. + 2019-08-27 Marek Polacek 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 index 00000000000..2543038e93e --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/unaligned-argument-3.c @@ -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 } } */