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

--- Comment #62 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Edwin Lu <e...@gcc.gnu.org>:

https://gcc.gnu.org/g:c4eff4ece764d836eb7ee0c0163780d100471730

commit r13-8579-gc4eff4ece764d836eb7ee0c0163780d100471730
Author: Edwin Lu <e...@rivosinc.com>
Date:   Mon Mar 18 11:43:41 2024 -0700

    RISC-V: Fix C23 (...) functions returning large aggregates [PR114175]

    We assume that TYPE_NO_NAMED_ARGS_STDARG_P don't have any named arguments
and
    there is nothing to advance, but that is not the case for (...) functions
    returning by hidden reference which have one such artificial argument.
    This causes gcc.dg/c23-stdarg-[68].c to fail

    Fix the issue by checking if arg.type is NULL as r14-9503-g218d1749612
    explains

    Tested on linux rv64gcv.

    gcc/ChangeLog:

            PR target/114175
            * config/riscv/riscv.cc (riscv_setup_incoming_varargs): Only skip
            riscv_funciton_arg_advance for TYPE_NO_NAMED_ARGS_STDARG_P
functions
            if arg.type is NULL

    (cherry picked from commit 60586710b0646efdbbd77a7f53b93fb5edb87a61)

Reply via email to