[2/2] aarch64: add -fno-stack-protector to some tests [PR108411]

Message ID 20230118201649.11612-2-christophe.lyon@arm.com
State Accepted
Headers
Series [1/2] aarch64: fix ICE in aarch64_layout_arg [PR108411] |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Christophe Lyon Jan. 18, 2023, 8:16 p.m. UTC
  As discussed in the PR, these recently added tests fail when the
testsuite is executed with -fstack-protector-strong.  To avoid this,
this patch adds -fno-stack-protector to dg-options.

	PR target/108411
	gcc/testsuite
	* g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C: Add
	-fno-stack-protector.
	* g++.target/aarch64/bitfield-abi-warning-align16-O2.C: Likewise.
	* g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C: Likewise.
	* g++.target/aarch64/bitfield-abi-warning-align32-O2.C: Likewise.
	* g++.target/aarch64/bitfield-abi-warning-align8-O2.C: Likewise.
	* gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c: Likewise.
	* gcc.target/aarch64/bitfield-abi-warning-align16-O2.c: Likewise.
	* gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c: Likewise.
	* gcc.target/aarch64/bitfield-abi-warning-align32-O2.c: Likewise.
	* gcc.target/aarch64/bitfield-abi-warning-align8-O2.c: Likewise.
---
 .../g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C  | 2 +-
 .../g++.target/aarch64/bitfield-abi-warning-align16-O2.C        | 2 +-
 .../g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C  | 2 +-
 .../g++.target/aarch64/bitfield-abi-warning-align32-O2.C        | 2 +-
 .../g++.target/aarch64/bitfield-abi-warning-align8-O2.C         | 2 +-
 .../gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c  | 2 +-
 .../gcc.target/aarch64/bitfield-abi-warning-align16-O2.c        | 2 +-
 .../gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c  | 2 +-
 .../gcc.target/aarch64/bitfield-abi-warning-align32-O2.c        | 2 +-
 .../gcc.target/aarch64/bitfield-abi-warning-align8-O2.c         | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)
  

Comments

Richard Sandiford Jan. 19, 2023, 9:23 a.m. UTC | #1
Christophe Lyon <christophe.lyon@arm.com> writes:
> As discussed in the PR, these recently added tests fail when the
> testsuite is executed with -fstack-protector-strong.  To avoid this,
> this patch adds -fno-stack-protector to dg-options.
>
> 	PR target/108411
> 	gcc/testsuite
> 	* g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C: Add
> 	-fno-stack-protector.
> 	* g++.target/aarch64/bitfield-abi-warning-align16-O2.C: Likewise.
> 	* g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C: Likewise.
> 	* g++.target/aarch64/bitfield-abi-warning-align32-O2.C: Likewise.
> 	* g++.target/aarch64/bitfield-abi-warning-align8-O2.C: Likewise.
> 	* gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c: Likewise.
> 	* gcc.target/aarch64/bitfield-abi-warning-align16-O2.c: Likewise.
> 	* gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c: Likewise.
> 	* gcc.target/aarch64/bitfield-abi-warning-align32-O2.c: Likewise.
> 	* gcc.target/aarch64/bitfield-abi-warning-align8-O2.c: Likewise.

OK, thanks.

Richard

> ---
>  .../g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C  | 2 +-
>  .../g++.target/aarch64/bitfield-abi-warning-align16-O2.C        | 2 +-
>  .../g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C  | 2 +-
>  .../g++.target/aarch64/bitfield-abi-warning-align32-O2.C        | 2 +-
>  .../g++.target/aarch64/bitfield-abi-warning-align8-O2.C         | 2 +-
>  .../gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c  | 2 +-
>  .../gcc.target/aarch64/bitfield-abi-warning-align16-O2.c        | 2 +-
>  .../gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c  | 2 +-
>  .../gcc.target/aarch64/bitfield-abi-warning-align32-O2.c        | 2 +-
>  .../gcc.target/aarch64/bitfield-abi-warning-align8-O2.c         | 2 +-
>  10 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C
> index 443cd458b4c..52f9cdd1ee9 100644
> --- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C
> +++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
>  
>  #define ALIGN 16
>  //#define EXTRA
> diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C
> index 76a7e3d0ad4..9ff4e46645b 100644
> --- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C
> +++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
>  
>  #define ALIGN 16
>  #define EXTRA
> diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C
> index 6f8f54f41ff..55dcbfe4b7c 100644
> --- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C
> +++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
>  
>  #define ALIGN 32
>  //#define EXTRA
> diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C
> index 6b8ad5fbea1..6bb8778ee90 100644
> --- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C
> +++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
>  
>  #define ALIGN 32
>  #define EXTRA
> diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C
> index b1764d97ea0..41bcc894a2b 100644
> --- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C
> +++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
>  
>  #define ALIGN 8
>  #define EXTRA
> diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c
> index f248a129509..3b2c932ac23 100644
> --- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c
> +++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
>  
>  #define ALIGN 16
>  //#define EXTRA
> diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c
> index 22ee5ec4c92..ee5d6faa428 100644
> --- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c
> +++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
>  
>  #define ALIGN 16
>  #define EXTRA
> diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c
> index a8a50b35e8e..6d4a883a96e 100644
> --- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c
> +++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
>  
>  #define ALIGN 32
>  //#define EXTRA
> diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c
> index e872de3dbe0..331daba354c 100644
> --- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c
> +++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
>  
>  #define ALIGN 32
>  #define EXTRA
> diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c
> index cb2a945a819..e6d45f5dd5c 100644
> --- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c
> +++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -save-temps" } */
> +/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
>  
>  #define ALIGN 8
>  #define EXTRA
  

Patch

diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C
index 443cd458b4c..52f9cdd1ee9 100644
--- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C
+++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
 
 #define ALIGN 16
 //#define EXTRA
diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C
index 76a7e3d0ad4..9ff4e46645b 100644
--- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C
+++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align16-O2.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
 
 #define ALIGN 16
 #define EXTRA
diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C
index 6f8f54f41ff..55dcbfe4b7c 100644
--- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C
+++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
 
 #define ALIGN 32
 //#define EXTRA
diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C
index 6b8ad5fbea1..6bb8778ee90 100644
--- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C
+++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align32-O2.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
 
 #define ALIGN 32
 #define EXTRA
diff --git a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C
index b1764d97ea0..41bcc894a2b 100644
--- a/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C
+++ b/gcc/testsuite/g++.target/aarch64/bitfield-abi-warning-align8-O2.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps -Wno-narrowing" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps -Wno-narrowing" } */
 
 #define ALIGN 8
 #define EXTRA
diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c
index f248a129509..3b2c932ac23 100644
--- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c
+++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
 
 #define ALIGN 16
 //#define EXTRA
diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c
index 22ee5ec4c92..ee5d6faa428 100644
--- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c
+++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align16-O2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
 
 #define ALIGN 16
 #define EXTRA
diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c
index a8a50b35e8e..6d4a883a96e 100644
--- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c
+++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
 
 #define ALIGN 32
 //#define EXTRA
diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c
index e872de3dbe0..331daba354c 100644
--- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c
+++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align32-O2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
 
 #define ALIGN 32
 #define EXTRA
diff --git a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c
index cb2a945a819..e6d45f5dd5c 100644
--- a/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c
+++ b/gcc/testsuite/gcc.target/aarch64/bitfield-abi-warning-align8-O2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps" } */
+/* { dg-options "-O2 -fno-stack-protector -save-temps" } */
 
 #define ALIGN 8
 #define EXTRA