diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-04-03 08:52:47 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-04-03 08:52:47 +0200 |
commit | 3f0d34f33d081680c2dca1c8792a9cd57a19148a (patch) | |
tree | 07a3994018724d91f7823125b06a58c1de7e1a21 | |
parent | 047c200ffcfd301776178d5f6cd6d5108bf965bf (diff) | |
download | gcc-3f0d34f33d081680c2dca1c8792a9cd57a19148a.zip gcc-3f0d34f33d081680c2dca1c8792a9cd57a19148a.tar.gz gcc-3f0d34f33d081680c2dca1c8792a9cd57a19148a.tar.bz2 |
testsuite: i386: Fix gcc.target/i386/pr82142?.c etc. on Solaris/x86
Three tests FAIL on Solaris/x86 in similar ways:
FAIL: gcc.target/i386/pr111673.c check-function-bodies advance
FAIL: gcc.target/i386/pr82142a.c check-function-bodies assignzero
FAIL: gcc.target/i386/pr82142b.c check-function-bodies assignzero
All tests FAIL as is because they lack either or both of the .LFB0 label
and the .cfi_startproc directive:
* The 32-bit pr82142b.c test lacks both, whether as or gas is in use: as
lacks full support for the cfi directives and the .LFB0 label is only
emitted with -fasynchronous-unwind-tables.
* The 64-bit tests pr111673.c and pr82142a.c already work with gas, but
with as the cfi directives are again missing.
In addition, the 32-bit test (pr82142b.c) still FAILs because 32-bit
Solaris/x86 defaults to -mstackrealign.
To fix all this, this patch adds -fasynchronous-unwind-tables
-fdwarf2-cfi-asm to all tests to force the generation of both the .LFB0
label and .cfi_startproc (which is ok since they are compile tests). In
addition, pr82142b.c is compiled with -mno-stackrealign to avoid
platform differences.
Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
2025-03-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
* gcc.target/i386/pr111673.c (dg-options): Add
-fasynchronous-unwind-tables -fdwarf2-cfi-asm.
* gcc.target/i386/pr82142a.c: Likewise.
* gcc.target/i386/pr82142b.c (dg-options): Add -mno-stackrealign
-fasynchronous-unwind-tables -fdwarf2-cfi-asm.
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr111673.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr82142a.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr82142b.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr111673.c b/gcc/testsuite/gcc.target/i386/pr111673.c index b9ceacf..0f08ba89 100644 --- a/gcc/testsuite/gcc.target/i386/pr111673.c +++ b/gcc/testsuite/gcc.target/i386/pr111673.c @@ -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 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr82142a.c b/gcc/testsuite/gcc.target/i386/pr82142a.c index a40c038..a536150 100644 --- a/gcc/testsuite/gcc.target/i386/pr82142a.c +++ b/gcc/testsuite/gcc.target/i386/pr82142a.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -mno-avx -msse2" } */ +/* { dg-options "-O2 -mno-avx -msse2 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr82142b.c b/gcc/testsuite/gcc.target/i386/pr82142b.c index b1bf12d..d18b7c4 100644 --- a/gcc/testsuite/gcc.target/i386/pr82142b.c +++ b/gcc/testsuite/gcc.target/i386/pr82142b.c @@ -1,5 +1,5 @@ /* { dg-do compile { target ia32 } } */ -/* { dg-options "-O2 -mno-avx -msse2" } */ +/* { dg-options "-O2 -mno-avx -msse2 -mno-stackrealign -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */ |