aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-03-20 16:59:21 +0100
committerJakub Jelinek <jakub@redhat.com>2024-03-20 16:59:21 +0100
commitb089ceb365e5132e4b2a8acfb18127bbee2d0d00 (patch)
treecde5e403b1097a67a28d62efaee39c18a1c1bc5a
parent68eca9b6aefeb40bdd4c55e42528cb32d1e2935b (diff)
downloadgcc-b089ceb365e5132e4b2a8acfb18127bbee2d0d00.zip
gcc-b089ceb365e5132e4b2a8acfb18127bbee2d0d00.tar.gz
gcc-b089ceb365e5132e4b2a8acfb18127bbee2d0d00.tar.bz2
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 <jakub@redhat.com> 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.
-rw-r--r--gcc/config/epiphany/epiphany.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/epiphany/epiphany.cc b/gcc/config/epiphany/epiphany.cc
index d6c057f..79254c2 100644
--- a/gcc/config/epiphany/epiphany.cc
+++ b/gcc/config/epiphany/epiphany.cc
@@ -728,7 +728,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;