https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121784
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Heinrich Schuchardt from comment #9)
> Thanks Jakub for you detailed explanation that should help to improve the
> Skia code.
>
> As some of the tail functions modify the passed parameters (vectors r, g, b)
> and then pass them to the next tail function unfortunately your workaround
> is not applicable.
>
> This is one of the functions that may be used in the tail function chain:
>
> STAGE(matrix_3x3, const skcms_Matrix3x3* matrix) {
> const float* m = &matrix->vals[0][0];
>
> F R = m[0]*r + m[1]*g + m[2]*b,
> G = m[3]*r + m[4]*g + m[5]*b,
> B = m[6]*r + m[7]*g + m[8]*b;
>
> r = R;
> g = G;
> b = B;
> }
If so, you can't use [[clang::musttail]] nor [[gnu::musttail]] attributes for
those calls on targets with such ABIs (so ifdef it out for whatever RISCV ABIs
do that or whatever others). musttail attribute is try hard to tail call this
and if not possible, emit an error instead of doing a silent non-tail call.