* [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp
@ 2023-03-01 18:07 Xi Ruoyao
2023-03-01 18:07 ` [PATCH 1/8] aarch64: testsuite: disable PIE for aapcs64 tests [PR70150] Xi Ruoyao
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
Hi,
This patch series fixes a lot of test failures with --enable-default-pie
or --enable-default-ssp for AArch64 target. Only test files are changed
to disable PIE or SSP to satisify the expectation of the developer who
programmed the test.
Bootstrapped and regtested on aarch64-linux-gnu. Ok for trunk?
Xi Ruoyao (8):
aarch64: testsuite: disable PIE for aapcs64 tests [PR70150]
aarch64: testsuite: disable PIE for tests with large code model
[PR70150]
aarch64: testsuite: disable PIE for fuse_adrp_add_1.c [PR70150]
aarch64: testsuite: disable stack protector for sve-pcs tests
aarch64: testsuite: disable stack protector for pr103147-10 tests
aarch64: testsuite: disable stack protector for auto-init-7.c
aarch64: testsuite: disable stack protector for pr104005.c
aarch64: testsuite: disable stack protector for tests relying on stack
offset
gcc/testsuite/g++.target/aarch64/pr103147-10.C | 2 +-
gcc/testsuite/gcc.dg/tls/pr78796.c | 2 +-
gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp | 2 +-
gcc/testsuite/gcc.target/aarch64/auto-init-7.c | 2 +-
gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr103147-10.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr104005.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr70120-2.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr78733.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr79041-2.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr94530.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr94577.c | 2 +-
gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c | 2 +-
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.target/aarch64/sve/pcs/aarch64-sve-pcs.exp | 7 ++++---
gcc/testsuite/gcc.target/aarch64/test_frame_17.c | 2 +-
19 files changed, 22 insertions(+), 21 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/8] aarch64: testsuite: disable PIE for aapcs64 tests [PR70150]
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 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 2/8] aarch64: testsuite: disable PIE for tests with large code model [PR70150] Xi Ruoyao
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
If GCC is built with --enable-default-pie, a lot of aapcs64 tests fail
because relocation unsupported in PIE is used.
gcc/testsuite/ChangeLog:
PR testsuite/70150
* gcc.target/aarch64/aapcs64/aapcs64.exp (additional_flags):
Add -fno-pie -no-pie.
---
gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
index fc6b3e8ada9..8cf9cc1e8e5 100644
--- a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
@@ -27,7 +27,7 @@ if { ![istarget aarch64*-*-*] } then {
torture-init
set-torture-options $C_TORTURE_OPTIONS
-set additional_flags "-W -Wall -Wno-abi"
+set additional_flags "-W -Wall -Wno-abi -fno-pie -no-pie"
# Test parameter passing. This uses abitest.S which relies on weak
# symbols.
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/8] aarch64: testsuite: disable PIE for tests with large code model [PR70150]
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 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 3/8] aarch64: testsuite: disable PIE for fuse_adrp_add_1.c [PR70150] Xi Ruoyao
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
These tests set large code model with -mcmodel=large or target pragma for
AArch64. But if GCC is configured with --enable-default-pie, it triggers
"sorry: unimplemented: code model large with -fpic". Disable PIE to make
avoid the issue.
gcc/testsuite/ChangeLog:
PR testsuite/70150
* gcc.dg/tls/pr78796.c (dg-additional-options): Add -fno-pie
-no-pie for aarch64-*-*.
* gcc.target/aarch64/pr63304_1.c (dg-options): Add -fno-pie.
* gcc.target/aarch64/pr70120-2.c (dg-options): Add -fno-pie.
* gcc.target/aarch64/pr78733.c (dg-options): Add -fno-pie.
* gcc.target/aarch64/pr79041-2.c (dg-options): Add -fno-pie.
* gcc.target/aarch64/pr94530.c (dg-options): Add -fno-pie.
* gcc.target/aarch64/pr94577.c (dg-options): Add -fno-pie.
* gcc.target/aarch64/reload-valid-spoff.c (dg-options): Add
-fno-pie.
---
gcc/testsuite/gcc.dg/tls/pr78796.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr70120-2.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr78733.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr79041-2.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr94530.c | 2 +-
gcc/testsuite/gcc.target/aarch64/pr94577.c | 2 +-
gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/tls/pr78796.c b/gcc/testsuite/gcc.dg/tls/pr78796.c
index 038e5366e41..96f87d47ba4 100644
--- a/gcc/testsuite/gcc.dg/tls/pr78796.c
+++ b/gcc/testsuite/gcc.dg/tls/pr78796.c
@@ -1,7 +1,7 @@
/* PR target/78796 */
/* { dg-do run } */
/* { dg-options "-O2" } */
-/* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */
+/* { dg-additional-options "-mcmodel=large -fno-pie -no-pie" { target aarch64-*-* } } */
/* { dg-require-effective-target tls_runtime } */
/* { dg-add-options tls } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c
index 9f1ed947806..5d519d817cc 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c
@@ -1,6 +1,6 @@
/* { dg-do assemble } */
/* { dg-require-effective-target lp64 } */
-/* { dg-options "-O1 --save-temps" } */
+/* { dg-options "-O1 --save-temps -fno-pie" } */
#pragma GCC push_options
#pragma GCC target ("+nothing+simd,cmodel=small")
diff --git a/gcc/testsuite/gcc.target/aarch64/pr70120-2.c b/gcc/testsuite/gcc.target/aarch64/pr70120-2.c
index 663bf2ed147..8f5cdc93fe3 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr70120-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr70120-2.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
-/* { dg-options "-Og -freorder-functions -g3 -mcmodel=large" } */
+/* { dg-options "-Og -freorder-functions -g3 -mcmodel=large -fno-pie" } */
typedef short v32u16 __attribute__ ((vector_size (32)));
typedef int v32u32 __attribute__ ((vector_size (32)));
diff --git a/gcc/testsuite/gcc.target/aarch64/pr78733.c b/gcc/testsuite/gcc.target/aarch64/pr78733.c
index 4695b5c1b2b..8556ef3f371 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr78733.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr78733.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads" } */
+/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads -fno-pie" } */
/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-fpic" } { "" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr79041-2.c b/gcc/testsuite/gcc.target/aarch64/pr79041-2.c
index 4695b5c1b2b..8556ef3f371 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr79041-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr79041-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads" } */
+/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads -fno-pie" } */
/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-fpic" } { "" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr94530.c b/gcc/testsuite/gcc.target/aarch64/pr94530.c
index 2797d116dcf..5dfdbe3311d 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr94530.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr94530.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
-/* { dg-options "-Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large" } */
+/* { dg-options "-Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large -fno-pie" } */
extern void bar(const char *);
diff --git a/gcc/testsuite/gcc.target/aarch64/pr94577.c b/gcc/testsuite/gcc.target/aarch64/pr94577.c
index 6f2d3612c26..d51799fb0bb 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr94577.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr94577.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mcmodel=large -mabi=ilp32" } */
+/* { dg-options "-mcmodel=large -mabi=ilp32 -fno-pie" } */
void
foo ()
diff --git a/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c b/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c
index 7b1982abb61..37e00ac9aa1 100644
--- a/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c
+++ b/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
-/* { dg-options "-O2 -mcmodel=large -fno-builtin" } */
+/* { dg-options "-O2 -mcmodel=large -fno-builtin -fno-pie" } */
/* { dg-skip-if "-mcmodel=large -fPIC not currently supported" { aarch64-*-* } { "-fPIC" } { "" } } */
typedef long unsigned int size_t;
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/8] aarch64: testsuite: disable PIE for fuse_adrp_add_1.c [PR70150]
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 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 4/8] aarch64: testsuite: disable stack protector for sve-pcs tests Xi Ruoyao
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
In PIE, symbol "fixed_regs" is addressed via GOT. It will break the
scan-assembler pattern and cause test failure with --enable-default-pie.
gcc/testsuite/ChangeLog:
PR testsuite/70150
* gcc.target/aarch64/fuse_adrp_add_1.c (dg-options): Add
-fno-pie.
---
gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c b/gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c
index e49aadaa639..d66fe3a4b23 100644
--- a/gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target aarch64_small } */
-/* { dg-options "-O3 -mcpu=cortex-a57" } */
+/* { dg-options "-O3 -mcpu=cortex-a57 -fno-pie" } */
enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
XGRF_REGS, ALL_REGS, LIM_REG_CLASSES };
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/8] aarch64: testsuite: disable stack protector for sve-pcs tests
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
` (2 preceding siblings ...)
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 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 5/8] aarch64: testsuite: disable stack protector for pr103147-10 tests Xi Ruoyao
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
If GCC is configured with --enable-default-ssp, the stack protector can
make many sve-pcs tests fail.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp (sve_flags):
Add -fno-stack-protector.
---
.../gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp b/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
index 5562502cc07..3dbf73f67c9 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
@@ -37,11 +37,12 @@ if ![info exists DEFAULT_CFLAGS] then {
# Initialize `dg'.
dg-init
-# Force SVE if we're not testing it already.
+# Force SVE if we're not testing it already. And, disable stack protector
+# to avoid test failures with --enable-default-ssp.
if { [check_effective_target_aarch64_sve] } {
- set sve_flags ""
+ set sve_flags "-fno-stack-protector"
} else {
- set sve_flags "-march=armv8.2-a+sve"
+ set sve_flags "-march=armv8.2-a+sve -fno-stack-protector"
}
# Main loop.
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/8] aarch64: testsuite: disable stack protector for pr103147-10 tests
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
` (3 preceding siblings ...)
2023-03-01 18:07 ` [PATCH 4/8] aarch64: testsuite: disable stack protector for sve-pcs tests Xi Ruoyao
@ 2023-03-01 18:07 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 6/8] aarch64: testsuite: disable stack protector for auto-init-7.c Xi Ruoyao
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
Stack protector influence code generation and cause function body checks
fail.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr103147-10.c (dg-options): Add
-fno-stack-protector.
* g++.target/aarch64/pr103147-10.C: Likewise.
---
gcc/testsuite/g++.target/aarch64/pr103147-10.C | 2 +-
gcc/testsuite/gcc.target/aarch64/pr103147-10.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/g++.target/aarch64/pr103147-10.C b/gcc/testsuite/g++.target/aarch64/pr103147-10.C
index 914fdf9c692..e12771533f7 100644
--- a/gcc/testsuite/g++.target/aarch64/pr103147-10.C
+++ b/gcc/testsuite/g++.target/aarch64/pr103147-10.C
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fpack-struct -mstrict-align" } */
+/* { dg-options "-O2 -fpack-struct -mstrict-align -fno-stack-protector" } */
/* { dg-final { check-function-bodies "**" "" "" } } */
#include <arm_neon.h>
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103147-10.c b/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
index b2c34e4155d..57942bfd10a 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fpack-struct -mstrict-align" } */
+/* { dg-options "-O2 -fpack-struct -mstrict-align -fno-stack-protector" } */
/* { dg-final { check-function-bodies "**" "" "" } } */
#include <arm_neon.h>
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 6/8] aarch64: testsuite: disable stack protector for auto-init-7.c
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
` (4 preceding siblings ...)
2023-03-01 18:07 ` [PATCH 5/8] aarch64: testsuite: disable stack protector for pr103147-10 tests Xi Ruoyao
@ 2023-03-01 18:07 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 7/8] aarch64: testsuite: disable stack protector for pr104005.c Xi Ruoyao
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
The test scans for "const_int 0" in the RTL dump, but stack protector
can produce more "const_int 0". To avoid a failure with
--enable-default-ssp, disable stack protector for this.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/auto-init-7.c (dg-options): Add
-fno-stack-protector.
---
gcc/testsuite/gcc.target/aarch64/auto-init-7.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/aarch64/auto-init-7.c b/gcc/testsuite/gcc.target/aarch64/auto-init-7.c
index ac27fbe92f4..fde6e568532 100644
--- a/gcc/testsuite/gcc.target/aarch64/auto-init-7.c
+++ b/gcc/testsuite/gcc.target/aarch64/auto-init-7.c
@@ -1,6 +1,6 @@
/* Verify zero initialization for array, union, and structure type automatic variables. */
/* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -fno-stack-protector" } */
struct S
{
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 7/8] aarch64: testsuite: disable stack protector for pr104005.c
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
` (5 preceding siblings ...)
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 ` Xi Ruoyao
2023-03-01 18:07 ` [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset Xi Ruoyao
2023-03-02 10:26 ` [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Richard Sandiford
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
Storing stack guarding variable need one stp instruction, breaking the
scan-assembler-not pattern in the test. Disable stack protector to
avoid a test failure with --enable-default-ssp.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr104005.c (dg-options): Add
-fno-stack-protector.
---
gcc/testsuite/gcc.target/aarch64/pr104005.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/aarch64/pr104005.c b/gcc/testsuite/gcc.target/aarch64/pr104005.c
index 09dd81910eb..9f1ef2dc308 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr104005.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr104005.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -funroll-loops" } */
+/* { dg-options "-O2 -funroll-loops -fno-stack-protector" } */
typedef int v2 __attribute__((vector_size(8)));
--
2.39.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
` (6 preceding siblings ...)
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
2023-03-02 10:26 ` [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Richard Sandiford
8 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-01 18:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Xi Ruoyao
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp
2023-03-01 18:07 [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp Xi Ruoyao
` (7 preceding siblings ...)
2023-03-01 18:07 ` [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset Xi Ruoyao
@ 2023-03-02 10:26 ` Richard Sandiford
2023-03-07 7:43 ` Pushed: " Xi Ruoyao
8 siblings, 1 reply; 11+ messages in thread
From: Richard Sandiford @ 2023-03-02 10:26 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: gcc-patches
Xi Ruoyao <xry111@xry111.site> writes:
> Hi,
>
> This patch series fixes a lot of test failures with --enable-default-pie
> or --enable-default-ssp for AArch64 target. Only test files are changed
> to disable PIE or SSP to satisify the expectation of the developer who
> programmed the test.
>
> Bootstrapped and regtested on aarch64-linux-gnu. Ok for trunk?
OK for the series. Thanks for doing this!
Richard
> Xi Ruoyao (8):
> aarch64: testsuite: disable PIE for aapcs64 tests [PR70150]
> aarch64: testsuite: disable PIE for tests with large code model
> [PR70150]
> aarch64: testsuite: disable PIE for fuse_adrp_add_1.c [PR70150]
> aarch64: testsuite: disable stack protector for sve-pcs tests
> aarch64: testsuite: disable stack protector for pr103147-10 tests
> aarch64: testsuite: disable stack protector for auto-init-7.c
> aarch64: testsuite: disable stack protector for pr104005.c
> aarch64: testsuite: disable stack protector for tests relying on stack
> offset
>
> gcc/testsuite/g++.target/aarch64/pr103147-10.C | 2 +-
> gcc/testsuite/gcc.dg/tls/pr78796.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp | 2 +-
> gcc/testsuite/gcc.target/aarch64/auto-init-7.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr103147-10.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr104005.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr70120-2.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr78733.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr79041-2.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr94530.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/pr94577.c | 2 +-
> gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c | 2 +-
> 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.target/aarch64/sve/pcs/aarch64-sve-pcs.exp | 7 ++++---
> gcc/testsuite/gcc.target/aarch64/test_frame_17.c | 2 +-
> 19 files changed, 22 insertions(+), 21 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Pushed: [PATCH 0/8] aarch64: testsuite: Fix test failures with --enable-default-pie or --enable-default-ssp
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 ` Xi Ruoyao
0 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-03-07 7:43 UTC (permalink / raw)
To: Richard Sandiford; +Cc: gcc-patches
On Thu, 2023-03-02 at 10:26 +0000, Richard Sandiford wrote:
> Xi Ruoyao <xry111@xry111.site> writes:
> > Hi,
> >
> > This patch series fixes a lot of test failures with --enable-default-pie
> > or --enable-default-ssp for AArch64 target. Only test files are changed
> > to disable PIE or SSP to satisify the expectation of the developer who
> > programmed the test.
> >
> > Bootstrapped and regtested on aarch64-linux-gnu. Ok for trunk?
>
> OK for the series. Thanks for doing this!
Pushed r13-6516 .. r13-6523.
>
> Richard
>
> > Xi Ruoyao (8):
> > aarch64: testsuite: disable PIE for aapcs64 tests [PR70150]
> > aarch64: testsuite: disable PIE for tests with large code model
> > [PR70150]
> > aarch64: testsuite: disable PIE for fuse_adrp_add_1.c [PR70150]
> > aarch64: testsuite: disable stack protector for sve-pcs tests
> > aarch64: testsuite: disable stack protector for pr103147-10 tests
> > aarch64: testsuite: disable stack protector for auto-init-7.c
> > aarch64: testsuite: disable stack protector for pr104005.c
> > aarch64: testsuite: disable stack protector for tests relying on stack
> > offset
> >
> > gcc/testsuite/g++.target/aarch64/pr103147-10.C | 2 +-
> > gcc/testsuite/gcc.dg/tls/pr78796.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp | 2 +-
> > gcc/testsuite/gcc.target/aarch64/auto-init-7.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/fuse_adrp_add_1.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr103147-10.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr104005.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr70120-2.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr78733.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr79041-2.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr94530.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/pr94577.c | 2 +-
> > gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c | 2 +-
> > 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.target/aarch64/sve/pcs/aarch64-sve-pcs.exp | 7 ++++---
> > gcc/testsuite/gcc.target/aarch64/test_frame_17.c | 2 +-
> > 19 files changed, 22 insertions(+), 21 deletions(-)
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-03-07 7:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset Xi Ruoyao
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
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).