From: Richard Sandiford Date: Tue, 13 Oct 2020 13:50:24 +0000 (+0100) Subject: [arm] Use -Os for stack-protector-[56].c tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f694a0d2edc025cb54657cb804960f97a31fbda2;p=gcc.git [arm] Use -Os for stack-protector-[56].c tests Using -O2 made the tests subject to LDRD vs. LDM tuning. The simplest fix seems to be to use -Os, so that LDM is unequivocally a win. gcc/testsuite/ * gcc.target/arm/stack-protector-5.c: Use -Os rather than -O2. * gcc.target/arm/stack-protector-6.c: Likewise. --- diff --git a/gcc/testsuite/gcc.target/arm/stack-protector-5.c b/gcc/testsuite/gcc.target/arm/stack-protector-5.c index b808b11aa3d..ae70b99efc4 100644 --- a/gcc/testsuite/gcc.target/arm/stack-protector-5.c +++ b/gcc/testsuite/gcc.target/arm/stack-protector-5.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fstack-protector-all -O2" } */ +/* { dg-options "-fstack-protector-all -Os" } */ void __attribute__ ((noipa)) f (void) diff --git a/gcc/testsuite/gcc.target/arm/stack-protector-6.c b/gcc/testsuite/gcc.target/arm/stack-protector-6.c index f8eec878bd6..2b7e6f72ea0 100644 --- a/gcc/testsuite/gcc.target/arm/stack-protector-6.c +++ b/gcc/testsuite/gcc.target/arm/stack-protector-6.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target fpic } */ -/* { dg-options "-fstack-protector-all -O2 -fpic" } */ +/* { dg-options "-fstack-protector-all -Os -fpic" } */ #include "stack-protector-5.c"