From: Rainer Orth Date: Thu, 12 Mar 2026 19:53:50 +0000 (+0100) Subject: testsuite: Fix gcc.dg/plugin/must-tail-call-2.c on SPARC [PR121159] X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fea034b49335eff45efaae01498f2b563f8d54ea;p=thirdparty%2Fgcc.git 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 gcc/testsuite: PR middle-end/121159 * gcc.dg/plugin/must-tail-call-2.c (dg-additional-options): Add -fdelayed-branch on SPARC. --- diff --git a/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c b/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c index 6f65f4ab96c..d37a016ae89 100644 --- a/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c +++ b/gcc/testsuite/gcc.dg/plugin/must-tail-call-2.c @@ -1,6 +1,8 @@ /* { dg-do compile { target tail_call } } */ /* Allow nested functions. */ /* { dg-options "-Wno-pedantic" } */ +/* PR middle-end/121159 */ +/* { dg-additional-options "-fdelayed-branch" { target sparc*-*-* } } */ struct box { char field[64]; int i; };