https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121159
--- Comment #19 from Lukas Grätz <lukas.gra...@tu-darmstadt.de> --- (In reply to Jakub Jelinek from comment #18) > Guess we need then an effective target for whether target can do indirect > musttail calls and add dg-error there guarded on the new effective target. According to the documentation, the effective target is called tail_call? (In reply to Rainer Orth from comment #17) > The modified gcc.dg/plugin/must-tail-call-2.c now FAIs on Solaris/SPARC (32 > and 64-bit): > > +FAIL: gcc.dg/plugin/must-tail-call-2.c -fplugin=./must_tail_call_plugin.so > (test for excess errors) > > Excess errors: > /vol/gcc/src/hg/master/local/gcc/testsuite/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 It seems that SPARC supports tail calls, as the test case without volatile/no_return compiles fine: https://godbolt.org/z/6bffMheY1 Does the following compile on your machine? typedef void (fn_ptr_t) (void); //volatile fn_ptr_t fn_ptr; void test_5 (void) { [[gnu::musttail]] return fn_ptr (); }