public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: gcc-patches@gcc.gnu.org
Cc: Richard Sandiford <richard.sandiford@arm.com>,
	Xi Ruoyao <xry111@xry111.site>
Subject: [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset
Date: Thu,  2 Mar 2023 02:07:20 +0800	[thread overview]
Message-ID: <20230301180720.26514-9-xry111@xry111.site> (raw)
In-Reply-To: <20230301180720.26514-1-xry111@xry111.site>

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.
---
 gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c     | 2 +-
 gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c | 2 +-
 gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c | 2 +-
 gcc/testsuite/gcc.target/aarch64/test_frame_17.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c b/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c
index ab7cd74ec3b..067220c04a0 100644
--- a/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { aarch64*-*-* } } } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-stack-protector" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
 /*
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
index 6885894a97e..412a9ed1aab 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
@@ -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
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
index 5796a53be06..e440569a078 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
@@ -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
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c
index 44f13291128..5d432ad0854 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-stack-protector" } */
 
 /* Test reuse of stack adjustment temporaries.  */
 
-- 
2.39.2


  parent reply	other threads:[~2023-03-01 18:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
2023-03-01 18:07 ` [PATCH 1/8] aarch64: testsuite: disable PIE for aapcs64 tests [PR70150] Xi Ruoyao
2023-03-01 18:07 ` [PATCH 2/8] aarch64: testsuite: disable PIE for tests with large code model [PR70150] Xi Ruoyao
2023-03-01 18:07 ` [PATCH 3/8] aarch64: testsuite: disable PIE for fuse_adrp_add_1.c [PR70150] Xi Ruoyao
2023-03-01 18:07 ` [PATCH 4/8] aarch64: testsuite: disable stack protector for sve-pcs tests Xi Ruoyao
2023-03-01 18:07 ` [PATCH 5/8] aarch64: testsuite: disable stack protector for pr103147-10 tests Xi Ruoyao
2023-03-01 18:07 ` [PATCH 6/8] aarch64: testsuite: disable stack protector for auto-init-7.c Xi Ruoyao
2023-03-01 18:07 ` [PATCH 7/8] aarch64: testsuite: disable stack protector for pr104005.c Xi Ruoyao
2023-03-01 18:07 ` Xi Ruoyao [this message]
2023-03-02 10:26 ` [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Richard Sandiford
2023-03-07  7:43   ` Pushed: " Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230301180720.26514-9-xry111@xry111.site \
    --to=xry111@xry111.site \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).