]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: i386: Guard NO_PROFILE_COUNTERS tests
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 25 Nov 2025 08:20:54 +0000 (09:20 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 25 Nov 2025 08:20:54 +0000 (09:20 +0100)
commit06ffbbaee89b89789aaaa2c7086fa8536632e80d
treeef5eff648eab677eb54e0b37bad6256f10101581
parentc99198d5185e60cf2dddcea2a56600a482bf8bc2
testsuite: i386: Guard NO_PROFILE_COUNTERS tests

After switching the i386 check-function-bodies tests to use the new
dg-add-options check_function_bodies feature, several tests still FAIL
in similar ways on Solaris/x86:

* Some FAIL like this:

FAIL: gcc.target/i386/pr120936-6.c (test for excess errors)
Excess errors:
cc1: error: '-mnop-mcount' is not compatible with this target

  This happens because -mnop-mcount is only supported in
  i386/i386-options.cc (ix86_option_override_internal) if
  NO_PROFILE_COUNTERS.

* Others FAIL like

FAIL: gcc.target/i386/pr120936-10.c (test for excess errors)
Excess errors:
gcc/testsuite/gcc.target/i386/pr120936-10.c:23:1: sorry, unimplemented: profiling '-mcmodel=large' with PIC is not supported

  This error is generated in i386/i386.cc (x86_function_profiler) if
  !NO_PROFILE_COUNTERS.

NO_PROFILE_COUNTERS is only defined in dragonfly.h, x86_64.sh,
gnu-user.h, freebsd.h, cygming.h, and, netbsd-elf.h.  However, a couple
of similar tests are restricted to Linux only, so this patch follows
suit.  One could introduce a new effective-target keyword to fully
handle this, though.

Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.

2025-11-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
* gcc.target/i386/pr120936-3.c: Restrict to *-*-linux*.
* gcc.target/i386/pr120936-6.c: Likewise.
* gcc.target/i386/pr120936-10.c: Likewise.
* gcc.target/i386/pr120936-12.c: Likewise.
gcc/testsuite/gcc.target/i386/pr120936-10.c
gcc/testsuite/gcc.target/i386/pr120936-12.c
gcc/testsuite/gcc.target/i386/pr120936-3.c
gcc/testsuite/gcc.target/i386/pr120936-6.c