https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104558

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is the
-      emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
-                     parm_align, partial, reg, excess, argblock,
-                     ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
-                     ARGS_SIZE_RTX (arg->locate.alignment_pad), false);
+      if (!CONST_INT_P (size_rtx) || INTVAL (size_rtx) != 0)
+       emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
+                       parm_align, partial, reg, excess, argblock,
+                       ARGS_SIZE_RTX (arg->locate.offset),
+                       reg_parm_stack_space,
+                       ARGS_SIZE_RTX (arg->locate.alignment_pad), false);
change that breaks this.  While we don't really need to push anything when
size_rtx is const0_rtx, emit_push_insn at the end does:
  if (alignment_pad && args_addr == 0)
    anti_adjust_stack (alignment_pad);
so I wonder if we don't need:
      else if (maybe_ne (arg->locate.alignment_pad, 0)
               && argblock == NULL_RTX)
        anti_adjust_stack (ARGS_SIZE_RTX (arg->locate.alignment_pad));
or so (also in the other spot).

Reply via email to