]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: testsuite: disable stack protector for tests relying on stack offset
authorXi Ruoyao <xry111@xry111.site>
Sat, 24 Sep 2022 07:16:57 +0000 (15:16 +0800)
committerXi Ruoyao <xry111@xry111.site>
Thu, 15 Jun 2023 10:20:25 +0000 (18:20 +0800)
Stack protector needs a guard value on the stack and change the stack
layout.  So we need to disable it for those tests, to avoid test failure
with --enable-default-ssp.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/shrink_wrap_1.c (dg-options): Add
-fno-stack-protector.
* gcc.target/aarch64/stack-check-cfa-1.c (dg-options): Add
-fno-stack-protector.
* gcc.target/aarch64/stack-check-cfa-2.c (dg-options): Add
-fno-stack-protector.
* gcc.target/aarch64/test_frame_17.c (dg-options): Add
-fno-stack-protector.

(cherry picked from commit 59a72acbccf4c81a04b4d09760fc8b16992de106)

gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c
gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
gcc/testsuite/gcc.target/aarch64/test_frame_17.c

index ab7cd74ec3b4488054e49f72532d40a31c027d63..067220c04a08515f4121698835248124c17b2e4d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { aarch64*-*-* } } } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-stack-protector" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
 /*
index 6885894a97e0a53cf87fc3ff9ded156014864c4d..412a9ed1aab020546d4528f1aa95cbadf73462bf 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */
+/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
 
 #define SIZE 128*1024
index 5796a53be0676bace2197e9d07a63b4b1757fd0d..e440569a07854146431b01866272336fd6250dda 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */
+/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
 
 #define SIZE 1280*1024 + 512
index 44f132911286779f63db60157987d568d3c13d0d..5d432ad0854e3caaa93bdeef96f7c1dc609818a3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-stack-protector" } */
 
 /* Test reuse of stack adjustment temporaries.  */