public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] arc: Fix up arc_setup_incoming_varargs [PR114175]
@ 2024-03-19  8:52 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2024-03-19  8:52 UTC (permalink / raw)
  To: gcc-patches

Hi!

Like for x86-64, alpha or rs6000, arc 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-19  Jakub Jelinek  <jakub@redhat.com>

	PR target/114175
	* config/arc/arc.cc (arc_setup_incoming_varargs): Only skip
	arc_function_arg_advance for TYPE_NO_NAMED_ARGS_STDARG_P functions
	if arg.type is NULL.

--- gcc/config/arc/arc.cc.jj	2024-01-09 13:47:23.156686787 +0100
+++ gcc/config/arc/arc.cc	2024-03-19 09:28:04.107112113 +0100
@@ -2352,7 +2352,8 @@ arc_setup_incoming_varargs (cumulative_a
   /* We must treat `__builtin_va_alist' as an anonymous arg.  */
 
   next_cum = *get_cumulative_args (args_so_far);
-  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)
     arc_function_arg_advance (pack_cumulative_args (&next_cum), arg);
   first_anon_arg = next_cum;
 

	Jakub


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-19  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19  8:52 [committed] arc: Fix up arc_setup_incoming_varargs [PR114175] Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).