]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: Fix gcc.dg/plugin/must-tail-call-2.c on SPARC [PR121159]
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 12 Mar 2026 19:53:50 +0000 (20:53 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 12 Mar 2026 19:53:50 +0000 (20:53 +0100)
commitfea034b49335eff45efaae01498f2b563f8d54ea
treef1cef72085692a082721f0ed8efe6fe5b620a35a
parent520f118f6e481b103d7a0a6040d3100f8703e293
testsuite: Fix gcc.dg/plugin/must-tail-call-2.c on SPARC [PR121159]

The gcc.dg/plugin/must-tail-call-2.c test FAILs on 32 and 64-bit SPARC:

FAIL: gcc.dg/plugin/must-tail-call-2.c -fplugin=./must_tail_call_plugin.so (test for excess errors)

Excess errors:
gcc.dg/plugin/must-tail-call-2.c:58:3: error: cannot tail-call: target is not able to optimize the call into a sibling call

As discussed in the PR, this can be avoided by compiling with
-fdelayed-branch on SPARC.

Tested on sparc-sun-solaris2.11, sparc64-unknown-linux-gnu, and
x86_64-pc-linux-gnu.

2026-03-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
PR middle-end/121159
* gcc.dg/plugin/must-tail-call-2.c (dg-additional-options): Add
-fdelayed-branch on SPARC.
gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c