https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128862

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
https://gcc.gnu.org/g:806799b32698fd509f03254132d6d29eba80ae5d

commit r17-6469-g806799b32698fd509f03254132d6d29eba80ae5d
Author: Eric Botcazou <[email protected]>
Date:   Thu Nov 19 14:59:03 2026 +0100

    SPARC: Fix internal error in function_arg_record_value

    This is an assertion failure in the function_arg_record_value routine of
    the SPARC back-end, but which comes from function_arg_slotno returning a
    slot for a structure containing a 1-element array of float passed as 7th
    argument to a function, while it should be passed on the stack on Linux.

    Fixed by finally redirecting the processing for all structures and unions
    in function_arg_record_value to the BLKmode path.  Tested and compat-tested
    on SPARC64/Solaris, applied on the mainline.

    gcc/
            * config/sparc/sparc.cc (sparc_pass_by_reference): Fix typos in
            comments.
            (function_arg_slotno): Redirect the processing for all structures
            and unions to the BLKmode path.  Test TARGET_ARCH64.
            (sparc_function_arg_1): Minor cleanup.
            (sparc_return_in_memory): Fix typos in comments.

    gcc/testsuite/
            * gcc.target/sparc/small-struct-2.c: New test.

Reply via email to