]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Disable -fstack-protector* for some strub tests
authorJakub Jelinek <jakub@redhat.com>
Mon, 11 Dec 2023 22:52:46 +0000 (23:52 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 11 Dec 2023 22:52:46 +0000 (23:52 +0100)
In our distro builds, we test with
RUNTESTFLAGS='--target_board=unix\{,-fstack-protector-strong\}'
because SSP is something we use widely in the distribution.
4 new strub test FAIL with that option though, as can be
seen with a simple
make check-gcc check-g++ RUNTESTFLAGS='--target_board=unix\{,-fstack-protector-strong\} dg.exp=strub-O*'
- in particular, the expand dump
\[(\]call\[^\n\]*strub_leave.*\n\[(\]code_label
regexps see code_labels in there introduced for stack protector.

The following patch fixes it by using -fno-stack-protector for these
explicitly.

2023-12-11  Jakub Jelinek  <jakub@redhat.com>

* c-c++-common/strub-O2fni.c: Add -fno-stack-protector to dg-options.
* c-c++-common/strub-O3fni.c: Likewise.
* c-c++-common/strub-Os.c: Likewise.
* c-c++-common/strub-Og.c: Likewise.

gcc/testsuite/c-c++-common/strub-O2fni.c
gcc/testsuite/c-c++-common/strub-O3fni.c
gcc/testsuite/c-c++-common/strub-Og.c
gcc/testsuite/c-c++-common/strub-Os.c

index 905e2c6b2ffcad471213555e5d4782b14b3cf208..acb8ceed1c5900adffd0fd3ce529a2ab6e293897 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fstrub=strict -fdump-rtl-expand -fno-inline" } */
+/* { dg-options "-O2 -fstrub=strict -fdump-rtl-expand -fno-inline -fno-stack-protector" } */
 /* { dg-require-effective-target strub } */
 
 /* With -fno-inline, none of the strub builtins are inlined.  */
index c46fce38e5c91efbe426a965e114872caca72e5b..454c706c3208092bc5d361c45386636dbcd3ac56 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fstrub=strict -fdump-rtl-expand -fno-inline" } */
+/* { dg-options "-O3 -fstrub=strict -fdump-rtl-expand -fno-inline -fno-stack-protector" } */
 /* { dg-require-effective-target strub } */
 
 /* With -fno-inline, none of the strub builtins are inlined.  */
index 3b8eb19765cd66281b71b3d71ea89c89fd113d1f..a81f220c08f26e844f86a77872151fcd57f5aef5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Og -fstrub=strict -fdump-rtl-expand" } */
+/* { dg-options "-Og -fstrub=strict -fdump-rtl-expand -fno-stack-protector" } */
 /* { dg-require-effective-target strub } */
 
 /* At -Og, without -fno-inline, we fully expand enter, but neither update nor
index 8cfb253d6764c3853c6ca096d822605083f3812e..5a146f00e1eaa853f20256b4d81e45a221a2ffe8 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -fstrub=strict -fdump-rtl-expand" } */
+/* { dg-options "-Os -fstrub=strict -fdump-rtl-expand -fno-stack-protector" } */
 /* { dg-require-effective-target strub } */
 
 /* At -Os, without -fno-inline, we fully expand enter, and also update.  The