From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C083F3858402; Tue, 19 Mar 2024 08:15:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C083F3858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710836108; bh=aU05a9HYRJNzeiZgG4ngOvJwSWq10Tgxac4vNt2ykRQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vet2GhriRil2w2f+Blso6EGi1sF8MYg1wnuWGdzJn6I2MC2LpKKcu2gkP1QGi3be8 zWf2DJMfs6dspigJzEIY1gXJ9M9g73+yXHvEhYnva/bAQI0qfEo5vdhsXreUZaDbEl 0MA0PTQ/eab2VmjhzrxttCaNcfoq5QgcNOmN7HEs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114175] [13/14] Execution test failures on gcc.dg/c23-stdarg-6.c on multiple targets Date: Tue, 19 Mar 2024 08:15:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ABI, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114175 --- Comment #33 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:8f85b46337f90c3126b9cefd72ffd29eb9a4ebf3 commit r14-9535-g8f85b46337f90c3126b9cefd72ffd29eb9a4ebf3 Author: Jakub Jelinek Date: Tue Mar 19 09:13:32 2024 +0100 rs6000: Fix up setup_incoming_varargs [PR114175] The c23-stdarg-8.c test (as well as the new test below added to cover e= ven more cases) FAIL on powerpc64le-linux and presumably other powerpc* tar= gets as well. Like in the r14-9503-g218d174961 change on x86-64 we need to advance next_cum after the hidden return pointer argument even in case where there are no user arguments before ... in C23. The following patch does that. There is another TYPE_NO_NAMED_ARGS_STDARG_P use later on: if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_dec= l)) && targetm.calls.must_pass_in_stack (arg)) first_reg_offset +=3D rs6000_arg_size (TYPE_MODE (arg.type), arg.type); but I believe it was added there in r13-3549-g4fe34cdc unnecessarily, when there is no hidden return pointer argument, arg.type is NULL and must_pass_in_stack_var_size as well as must_pass_in_stack_var_size_or_p= ad return false in that case, and for the TYPE_NO_NAMED_ARGS_STDARG_P case with hidden return pointer argument that argument should have poin= ter type and it is the first argument, so must_pass_in_stack shouldn't be t= rue for it either. 2024-03-19 Jakub Jelinek PR target/114175 * config/rs6000/rs6000-call.cc (setup_incoming_varargs): Only s= kip rs6000_function_arg_advance_1 for TYPE_NO_NAMED_ARGS_STDARG_P functions if arg.type is NULL. * gcc.dg/c23-stdarg-9.c: New test.=