2019-08-17 Bernd Edlinger PR middle-end/89544 * gcc.target/arm/unaligned-argument-3.c: New test. Index: gcc/testsuite/gcc.target/arm/unaligned-argument-3.c =================================================================== --- gcc/testsuite/gcc.target/arm/unaligned-argument-3.c (revision 0) +++ gcc/testsuite/gcc.target/arm/unaligned-argument-3.c (working copy) @@ -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 } } */