From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 81CA23858C42; Sat, 30 Mar 2024 03:54:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81CA23858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711770890; bh=6WB8af9bgCCycMIRBbgW0PRJhfuMlFey47dvyNQT+co=; h=From:To:Subject:Date:From; b=gZs/cfxnvYCQyayNxukm46zD2z/hLV1EsP2NsQe83v9YR9FxT+TbtDPPL071dvwbr RII+bfR0LLua5k9fI4e3SXdShplcXiXFntW3Zc+8qx7uYNP1PQMzDEBWDI9Bo/XNqc PRhI0JLXDzlXy1exK021OhnvIFLVm8bSEquT48Bw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-8514] epiphany: Fix up epiphany_setup_incoming_varargs [PR114175] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 06f9476a60bcf2d206b7b86e68ea433954f91f20 X-Git-Newrev: fce980ba3802e1adc68cb34ae81d17bc8c9d13b9 Message-Id: <20240330035450.81CA23858C42@sourceware.org> Date: Sat, 30 Mar 2024 03:54:50 +0000 (GMT) List-Id: https://gcc.gnu.org/g:fce980ba3802e1adc68cb34ae81d17bc8c9d13b9 commit r13-8514-gfce980ba3802e1adc68cb34ae81d17bc8c9d13b9 Author: Jakub Jelinek Date: Wed Mar 20 16:59:21 2024 +0100 epiphany: Fix up epiphany_setup_incoming_varargs [PR114175] Like for x86-64, alpha or rs6000, epiphany seems to be affected too. Just visually checked differences in c23-stdarg-9.c assembly in a cross without/with the patch, committed to trunk. 2024-03-20 Jakub Jelinek PR target/114175 * config/epiphany/epiphany.cc (epiphany_setup_incoming_varargs): Only skip function arg advance for TYPE_NO_NAMED_ARGS_STDARG_P functions if arg.type is NULL. (cherry picked from commit b089ceb365e5132e4b2a8acfb18127bbee2d0d00) Diff: --- gcc/config/epiphany/epiphany.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/epiphany/epiphany.cc b/gcc/config/epiphany/epiphany.cc index fdd4df71456..ab707d9a9f7 100644 --- a/gcc/config/epiphany/epiphany.cc +++ b/gcc/config/epiphany/epiphany.cc @@ -731,7 +731,8 @@ epiphany_setup_incoming_varargs (cumulative_args_t cum, gcc_assert (arg.mode != BLKmode); next_cum = *get_cumulative_args (cum); - if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl))) + if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl)) + || arg.type != NULL_TREE) next_cum = (ROUND_ADVANCE_CUM (next_cum, arg.mode, arg.type) + ROUND_ADVANCE_ARG (arg.mode, arg.type)); first_anon_arg = next_cum;