https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114175
--- Comment #35 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>: https://gcc.gnu.org/g:c1fd4589c2bf9fd8409d51b94df219cb75107762 commit r14-9538-gc1fd4589c2bf9fd8409d51b94df219cb75107762 Author: Xi Ruoyao <xry...@xry111.site> Date: Mon Mar 18 17:18:34 2024 +0800 LoongArch: Fix C23 (...) functions returning large aggregates [PR114175] We were assuming 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 is causing gcc.dg/c23-stdarg-6.c and gcc.dg/c23-stdarg-8.c to fail. Fix the issue by checking if arg.type is NULL, as r14-9503 explains. gcc/ChangeLog: PR target/114175 * config/loongarch/loongarch.cc (loongarch_setup_incoming_varargs): Only skip loongarch_function_arg_advance for TYPE_NO_NAMED_ARGS_STDARG_P functions if arg.type is NULL.