]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite/70230 - fix failures with default SSP\
authorAllan McRae <allan@archlinux.org>
Fri, 28 Jan 2022 17:44:08 +0000 (12:44 -0500)
committerJeff Law <jeffreyalaw@gmail.com>
Fri, 28 Jan 2022 17:45:16 +0000 (12:45 -0500)
Configuring with --enable-default-ssp triggers various testsuite
failures.  These contain asm statements that are not compatible with
-fstack-protector.  Adding -fno-stack-protector to dg-options to
work around this issue.

Tested on x86_64-linux.

PR testsuite/70230
* gcc.dg/asan/use-after-scope-4.c (dg-options): Add
-fno-stack-protector.
* gcc.dg/stack-usage-1.c: Likewise
* gcc.dg/superblock.c: Likewise
* gcc.target/i386/avx-vzeroupper-17.c: Likewise
* gcc.target/i386/cleanup-1.c: Likewise
* gcc.target/i386/cleanup-2.c: Likewise
* gcc.target/i386/interrupt-redzone-1.c: Likewise
* gcc.target/i386/interrupt-redzone-2.c: Likewise
* gcc.target/i386/pr79793-1.c: Likewise
* gcc.target/i386/pr79793-2.c: Likewise
* gcc.target/i386/shrink_wrap_1.c: Likewise
* gcc.target/i386/stack-check-11.c: Likewise
* gcc.target/i386/stack-check-18.c: Likewise
* gcc.target/i386/stack-check-19.c: Likewise
* gcc.target/i386/stackalign/pr88483-1.c: Likewise
* gcc.target/i386/stackalign/pr88483-2.c: Likewise
* gcc.target/i386/sw-1.c: Likewise

17 files changed:
gcc/testsuite/gcc.dg/asan/use-after-scope-4.c
gcc/testsuite/gcc.dg/stack-usage-1.c
gcc/testsuite/gcc.dg/superblock.c
gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c
gcc/testsuite/gcc.target/i386/cleanup-1.c
gcc/testsuite/gcc.target/i386/cleanup-2.c
gcc/testsuite/gcc.target/i386/interrupt-redzone-1.c
gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c
gcc/testsuite/gcc.target/i386/pr79793-1.c
gcc/testsuite/gcc.target/i386/pr79793-2.c
gcc/testsuite/gcc.target/i386/shrink_wrap_1.c
gcc/testsuite/gcc.target/i386/stack-check-11.c
gcc/testsuite/gcc.target/i386/stack-check-18.c
gcc/testsuite/gcc.target/i386/stack-check-19.c
gcc/testsuite/gcc.target/i386/stackalign/pr88483-1.c
gcc/testsuite/gcc.target/i386/stackalign/pr88483-2.c
gcc/testsuite/gcc.target/i386/sw-1.c

index 44dc79535d2ab7921eda8581238b875fc3f0ffe1..e1486e75045f4abfea550c6664290e2271d35949 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do run }
+/* { dg-options "-fno-stack-protector" } */
 
 #define FN(NAME) \
 NAME (void) \
index 93cfe7c01639251cfe65edbf40ecc29c9eff41c5..1d7d1fee4351f9745acc802bebdfe182c5473fe1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fstack-usage" } */
+/* { dg-options "-fstack-usage -fno-stack-protector" } */
 /* nvptx doesn't have a reg allocator, and hence no stack usage data.  */
 /* { dg-skip-if "" { nvptx-*-* } } */
 
index 2b2fa9e154fb48d66139d4db328c2003aa82fd79..6b4419adaf59048c28c6abbe6c4ea880ed65f42f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro" } */
+/* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro -fno-stack-protector" } */
 /* { dg-require-effective-target scheduling } */
 
 typedef int aligned __attribute__ ((aligned (64)));
index 6dc0dc053214768acb2c07d4ceeec67efdd64556..d677e6f10e0101035dfb90323710d066a15599eb 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target lp64 } } */
-/* { dg-options "-O2 -mavx -mabi=ms -dp" } */
+/* { dg-options "-O2 -mavx -mabi=ms -dp -fno-stack-protector" } */
 
 typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
 
index dcfcc4edb5fa992019f59f431c24c2375039f1f3..6e7544c6b7ac21358788dde8a6201a523584a2f4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run { target *-*-linux* *-*-gnu* } } */
-/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2" } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2 -fno-stack-protector" } */
 /* Test complex CFA value expressions.  */
 
 #include <unwind.h>
index 7e60323373b8553e78dafdbe1f19b2a97eb2ef07..a24daba73da2b9d4688fad922f6da3fde9a1ff63 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2" } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2 -fno-stack-protector" } */
 /* Test complex CFA value expressions.  */
 
 #include <unwind.h>
index 10098848c506007c5ff3dcafd41df44233ddcdc5..0c412db427e3791b1944badb53f8a8d111ac7cbb 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone -fno-stack-protector" } */
 
 void
 __attribute__((interrupt))
index 2577f43c91681217d71961bf500d3beb1dfe94a0..caea99665f23036b8e77f9127526b49088330c02 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone -fno-stack-protector" } */
 
 void
 __attribute__((interrupt))
index 1cc67a83ba39f0a8be20a6b3adbd35a27cde2092..102d63afe8d989ccdf31d770ce13e177e59f6dd4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic -fno-stack-protector" } */
 
 void
  __attribute__ ((interrupt))
index e1e6463e120a38932c52946b2644cd61ea09168b..30f22bea988428ec27ca08df17c7d04797fb964d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic -fno-stack-protector" } */
 
 typedef unsigned int uword_t __attribute__ ((mode (__word__)));
 
index 94dadd6cdbd84a26de98e0575559be81e7444e1a..4b286671e90bb6f785927566ba4f3ca5933ca792 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */
+/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue -fno-stack-protector" } */
 
 enum machine_mode
 {
index 90ab6023b422f57d1562f3fb2780393f1477d669..48341cedcd4b91284b9d972cca0d81eb1d66e5cd 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection -mtune=generic" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
 
 #include <stdint.h>
index 1cf4bbcfafb54f4a9a5b75462896c3a9763c384c..a0aab4a982386a7855e535931372cb9df6e6b7d8 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
 /* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */
 
index bf6af5ffc3e95147a249bd8c074ce58be9ca2af5..94c75dcb47ce42af506d97a1cfb7ee9c5b001002 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
 /* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */
 
index c8bb0832fe26d359582239c16770e219b64f6ccb..11ecdd52aa1569cbfcfdf2e0a05a41b178cd0244 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mavx2" } */
+/* { dg-options "-O2 -mavx2 -fno-stack-protector" } */
 
 struct B
 {
index e94fa1d18fad5f04e9c80714e8bfb3a32f72fde6..33174fa29dec2800ddd61a1620b574efde214dd3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mavx512f" } */
+/* { dg-options "-O2 -mavx512f -fno-stack-protector" } */
 
 struct B
 {
index a9c89fca4ec46296d669ac5e85a4f4e2d6592641..b0432279644aa42efc4dea9efffa108bec7fae28 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune=generic -fshrink-wrap -fdump-rtl-pro_and_epilogue" } */
+/* { dg-options "-O2 -mtune=generic -fshrink-wrap -fdump-rtl-pro_and_epilogue -fno-stack-protector" } */
 /* { dg-additional-options "-mno-avx" { target ia32 } } */
 /* { dg-skip-if "No shrink-wrapping preformed" { x86_64-*-mingw* } } */