[arm] Use -Os for stack-protector-[56].c tests
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 13 Oct 2020 13:50:24 +0000 (14:50 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 13 Oct 2020 13:50:24 +0000 (14:50 +0100)
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.

gcc/testsuite/gcc.target/arm/stack-protector-5.c
gcc/testsuite/gcc.target/arm/stack-protector-6.c

index b808b11aa3dbc756062b503c14f1f981c0a9ca61..ae70b99efc41ebb805d9b2598160ee9a8dd6b91e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fstack-protector-all -O2" } */
+/* { dg-options "-fstack-protector-all -Os" } */
 
 void __attribute__ ((noipa))
 f (void)
index f8eec878bd62473096b057fbe69d935ad97a04d7..2b7e6f72ea09697d6558abf113e3c8c1dc2b8efa 100644 (file)
@@ -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"