From: Rainer Orth Date: Sun, 28 Dec 2025 10:08:07 +0000 (+0100) Subject: testsuite: i386: Fix up check-function-bodies tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a616f73cda150aebad1caa5f2eab4da0d75023e3;p=thirdparty%2Fgcc.git testsuite: i386: Fix up check-function-bodies tests Several recent tests that use check-function-bodies on x86 FAIL on Solaris: they all lack dg-add-options check_function_bodies which is required to handle some Solaris differences. One test also needs -fomit-frame-pointer to deal with a different Solaris/x86 default. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-12-10 Rainer Orth * gcc.target/i386/20040112-1.c: Add dg-add-options check_function_bodies. * gcc.target/i386/pr122343-1a.c: Likewise. * gcc.target/i386/pr122343-1b.c: Likewise. * gcc.target/i386/pr122343-2a.c: Likewise. * gcc.target/i386/pr122343-2b.c: Likewise. * gcc.target/i386/pr122343-3.c: Likewise. * gcc.target/i386/pr122343-4a.c: Likewise. * gcc.target/i386/pr122343-4b.c: Likewise. * gcc.target/i386/pr122343-5a.c: Likewise. * gcc.target/i386/pr122343-5b.c: Likewise. * gcc.target/i386/pr122343-6a.c: Likewise. * gcc.target/i386/pr122343-6b.c: Likewise. * gcc.target/i386/pr122343-7.c: Likewise. * gcc.target/i386/pr122675-1.c: Likewise. (dg-options): Add -fomit-frame-pointer. --- diff --git a/gcc/testsuite/gcc.target/i386/20040112-1.c b/gcc/testsuite/gcc.target/i386/20040112-1.c index ab53292ac7e..c5ff83dc099 100644 --- a/gcc/testsuite/gcc.target/i386/20040112-1.c +++ b/gcc/testsuite/gcc.target/i386/20040112-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-1a.c b/gcc/testsuite/gcc.target/i386/pr122343-1a.c index 7076d881174..75dc2155ff4 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-1a.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-1a.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-1b.c b/gcc/testsuite/gcc.target/i386/pr122343-1b.c index 989d3b23a78..56fbd2c7373 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-1b.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-1b.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer -fno-fuse-ops-with-volatile-access" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-2a.c b/gcc/testsuite/gcc.target/i386/pr122343-2a.c index f7ee02149ce..ed429d73557 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-2a.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-2a.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-2b.c b/gcc/testsuite/gcc.target/i386/pr122343-2b.c index d4a1151a586..34014a11d18 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-2b.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-2b.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer -fno-fuse-ops-with-volatile-access" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-3.c b/gcc/testsuite/gcc.target/i386/pr122343-3.c index 335f777d2a9..7522159076d 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-3.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-4a.c b/gcc/testsuite/gcc.target/i386/pr122343-4a.c index 3ae07a27cf1..6c871627bcd 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-4a.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-4a.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-4b.c b/gcc/testsuite/gcc.target/i386/pr122343-4b.c index 31a990eb363..4f020371e06 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-4b.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-4b.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer -fno-fuse-ops-with-volatile-access" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-5a.c b/gcc/testsuite/gcc.target/i386/pr122343-5a.c index 3d133b67157..01ce2007c13 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-5a.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-5a.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-5b.c b/gcc/testsuite/gcc.target/i386/pr122343-5b.c index 5f64496d6f4..ecfbe3f1df2 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-5b.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-5b.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer -fno-fuse-ops-with-volatile-access" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-6a.c b/gcc/testsuite/gcc.target/i386/pr122343-6a.c index 940182644c7..843d053d77e 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-6a.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-6a.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target { *-*-* } } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-6b.c b/gcc/testsuite/gcc.target/i386/pr122343-6b.c index f741f5ca98c..dbc79fd8517 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-6b.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-6b.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer -fno-fuse-ops-with-volatile-access" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122343-7.c b/gcc/testsuite/gcc.target/i386/pr122343-7.c index 0e4edd1e5e7..15c291801bb 100644 --- a/gcc/testsuite/gcc.target/i386/pr122343-7.c +++ b/gcc/testsuite/gcc.target/i386/pr122343-7.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target *-*-* } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr122675-1.c b/gcc/testsuite/gcc.target/i386/pr122675-1.c index fb41f5b2788..0da288a6584 100644 --- a/gcc/testsuite/gcc.target/i386/pr122675-1.c +++ b/gcc/testsuite/gcc.target/i386/pr122675-1.c @@ -1,6 +1,7 @@ /* Verify that the most likely BB edges are optimized as fallthroughs. */ /* { dg-do compile } */ -/* { dg-options "-O1 -fno-pic -march=x86-64 -mtune=generic -mgeneral-regs-only" } */ +/* { dg-options "-O1 -fno-pic -march=x86-64 -mtune=generic -mgeneral-regs-only -fomit-frame-pointer" } */ +/* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */