https://gcc.gnu.org/g:3a528af5ddf95b28330eb83408c3ed405f71cb0f
commit r16-5572-g3a528af5ddf95b28330eb83408c3ed405f71cb0f Author: Rainer Orth <[email protected]> Date: Tue Nov 25 09:23:08 2025 +0100 testsuite: i386: Restrict pr120936-1.c etc. to Linux After switching the i386 check-function-bodies tests to use the new dg-add-options check_function_bodies feature, several tests still FAIL in the same way on Solaris/x86. E.g. FAIL: gcc.target/i386/pr120936-1.c check-function-bodies foo The code differs between i686-pc-linux-gnu and i386-pc-solaris2.11 like this: - .cfi_def_cfa_register 5 - call mcount + .data + .align 4 +.LP0: + .long 0 + .text + movl $.LP0, %edx + call _mcount i.e. the test expects a call to mcount, while on Solaris _mcount is called instead. MCOUNT_NAME is only defined as mcount in gnu-user.h and x86-64.h, so the patch restricts the tests to Linux. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-11-23 Rainer Orth <[email protected]> gcc/testsuite: * gcc.target/i386/pr120936-1.c: Restrict to *-*-linux*. * gcc.target/i386/pr120936-2.c: Likewise. * gcc.target/i386/pr120936-4.c: Likewise. * gcc.target/i386/pr120936-5.c: Likewise. * gcc.target/i386/pr120936-9.c: Likewise. * gcc.target/i386/pr120936-11.c: Likewise. Diff: --- gcc/testsuite/gcc.target/i386/pr120936-1.c | 2 +- gcc/testsuite/gcc.target/i386/pr120936-11.c | 2 +- gcc/testsuite/gcc.target/i386/pr120936-2.c | 2 +- gcc/testsuite/gcc.target/i386/pr120936-4.c | 2 +- gcc/testsuite/gcc.target/i386/pr120936-5.c | 2 +- gcc/testsuite/gcc.target/i386/pr120936-9.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/pr120936-1.c b/gcc/testsuite/gcc.target/i386/pr120936-1.c index 7e2749eaeaeb..342487fcaf21 100644 --- a/gcc/testsuite/gcc.target/i386/pr120936-1.c +++ b/gcc/testsuite/gcc.target/i386/pr120936-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target fpic } } */ +/* { dg-do compile { target { *-*-linux* && fpic } } } */ /* { dg-options "-O2 -pg -mno-fentry -fno-pic -fno-shrink-wrap" } */ /* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ diff --git a/gcc/testsuite/gcc.target/i386/pr120936-11.c b/gcc/testsuite/gcc.target/i386/pr120936-11.c index 0a644df4b62b..90995f89bb35 100644 --- a/gcc/testsuite/gcc.target/i386/pr120936-11.c +++ b/gcc/testsuite/gcc.target/i386/pr120936-11.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { fpic && lp64 } } } */ +/* { dg-do compile { target { { *-*-linux* && lp64 } && fpic } } } */ /* { dg-options "-O2 -mrecord-mcount -mcmodel=large -pg -mno-fentry -fno-pic -fno-shrink-wrap" } */ /* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ diff --git a/gcc/testsuite/gcc.target/i386/pr120936-2.c b/gcc/testsuite/gcc.target/i386/pr120936-2.c index 770b8bcfaec0..615cc05fbfca 100644 --- a/gcc/testsuite/gcc.target/i386/pr120936-2.c +++ b/gcc/testsuite/gcc.target/i386/pr120936-2.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target fpic } } */ +/* { dg-do compile { target { *-*-linux* && fpic } } } */ /* { dg-options "-O2 -pg -mno-fentry -fpic -fno-shrink-wrap" } */ /* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ diff --git a/gcc/testsuite/gcc.target/i386/pr120936-4.c b/gcc/testsuite/gcc.target/i386/pr120936-4.c index 420efa3cb0e1..8580ec4444dd 100644 --- a/gcc/testsuite/gcc.target/i386/pr120936-4.c +++ b/gcc/testsuite/gcc.target/i386/pr120936-4.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target fpic } } */ +/* { dg-do compile { target { *-*-linux* && fpic } } } */ /* { dg-options "-O2 -pg -mno-fentry -mrecord-mcount -fno-pic -fno-shrink-wrap" } */ /* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ diff --git a/gcc/testsuite/gcc.target/i386/pr120936-5.c b/gcc/testsuite/gcc.target/i386/pr120936-5.c index 33ccb2da24cd..697e8d1801b2 100644 --- a/gcc/testsuite/gcc.target/i386/pr120936-5.c +++ b/gcc/testsuite/gcc.target/i386/pr120936-5.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target fpic } } */ +/* { dg-do compile { target { *-*-linux* && fpic } } } */ /* { dg-options "-O2 -pg -mrecord-mcount -mno-fentry -fpic -fno-shrink-wrap" } */ /* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ diff --git a/gcc/testsuite/gcc.target/i386/pr120936-9.c b/gcc/testsuite/gcc.target/i386/pr120936-9.c index 28e2b8d1d61a..6a9f4c14b6a9 100644 --- a/gcc/testsuite/gcc.target/i386/pr120936-9.c +++ b/gcc/testsuite/gcc.target/i386/pr120936-9.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { fpic && lp64 } } } */ +/* { dg-do compile { target { { *-*-linux* && lp64 } && fpic } } } */ /* { dg-options "-O2 -mcmodel=large -pg -mno-fentry -fno-pic -fno-shrink-wrap" } */ /* { dg-add-options check_function_bodies } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */
