public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] m32r: Fix up m32r_setup_incoming_varargs [PR114175]
@ 2024-03-20 16:06 Jakub Jelinek
  2024-03-20 16:58 ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2024-03-20 16:06 UTC (permalink / raw)
  To: gcc-patches

Hi!

Like for x86-64, alpha or rs6000, m32r 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/m32r/m32r.cc (m32r_setup_incoming_varargs): Only skip
	function arg advance for TYPE_NO_NAMED_ARGS_STDARG_P functions
	if arg.type is NULL.

--- gcc/config/m32r/m32r.cc.jj	2024-01-03 11:51:50.204472028 +0100
+++ gcc/config/m32r/m32r.cc	2024-03-20 16:12:15.841512952 +0100
@@ -1287,7 +1287,8 @@ m32r_setup_incoming_varargs (cumulative_
   if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl)))
     gcc_assert (arg.mode != BLKmode);
 
-  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)
     first_anon_arg = (ROUND_ADVANCE_CUM (*get_cumulative_args (cum),
 					 arg.mode, arg.type)
 		      + ROUND_ADVANCE_ARG (arg.mode, arg.type));

	Jakub


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-20 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 16:06 [committed] m32r: Fix up m32r_setup_incoming_varargs [PR114175] Jakub Jelinek
2024-03-20 16:58 ` Jeff Law
2024-03-20 17:29   ` Jakub Jelinek
2024-03-20 18:14     ` Jeff Law

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).