https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114175
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Maybe 2024-02-29 Jakub Jelinek <ja...@redhat.com> PR target/114175 * function.cc (assign_parms): Only call assign_parms_setup_varargs early for TYPE_NO_NAMED_ARGS_STDARG_P functions if fnargs is empty. --- gcc/function.cc.jj 2024-01-12 13:47:20.834428745 +0100 +++ gcc/function.cc 2024-02-29 21:14:35.275889093 +0100 @@ -3650,7 +3650,8 @@ assign_parms (tree fndecl) assign_parms_initialize_all (&all); fnargs = assign_parms_augmented_arg_list (&all); - if (TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (fndecl))) + if (TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (fndecl)) + && fnargs.is_empty ()) { struct assign_parm_data_one data = {}; assign_parms_setup_varargs (&all, &data, false); ? Because if the current function returns through hidden reference, fnargs is not empty and I'd say it should be not called before processing that hidden reference argument. Doesn't seem to change anything on x86_64/i686 on c23-stdarg-*.c, all still pass, and in cross to riscv I see difference in the f function.