@@ -167,6 +167,7 @@ ubsan_expand_si_overflow_addsub_check (t
do_error = gen_label_rtx ();
fn = ubsan_build_overflow_builtin (code, gimple_location (stmt),
TREE_TYPE (arg0), arg0, arg1);
+ do_pending_stack_adjust ();
op0 = expand_normal (arg0);
op1 = expand_normal (arg1);
@@ -233,6 +234,7 @@ ubsan_expand_si_overflow_addsub_check (t
emit_label (do_error);
/* Expand the ubsan builtin call. */
expand_normal (fn);
+ do_pending_stack_adjust ();
/* We're done. */
emit_label (done_label);
@@ -257,6 +259,7 @@ ubsan_expand_si_overflow_neg_check (gimp
fn = ubsan_build_overflow_builtin (NEGATE_EXPR, gimple_location (stmt),
TREE_TYPE (arg1), arg1, NULL_TREE);
+ do_pending_stack_adjust ();
op1 = expand_normal (arg1);
enum machine_mode mode = TYPE_MODE (TREE_TYPE (arg1));
@@ -306,6 +309,7 @@ ubsan_expand_si_overflow_neg_check (gimp
emit_label (do_error);
/* Expand the ubsan builtin call. */
expand_normal (fn);
+ do_pending_stack_adjust ();
/* We're done. */
emit_label (done_label);
@@ -331,6 +335,7 @@ ubsan_expand_si_overflow_mul_check (gimp
fn = ubsan_build_overflow_builtin (MULT_EXPR, gimple_location (stmt),
TREE_TYPE (arg0), arg0, arg1);
+ do_pending_stack_adjust ();
op0 = expand_normal (arg0);
op1 = expand_normal (arg1);
@@ -409,6 +414,7 @@ ubsan_expand_si_overflow_mul_check (gimp
emit_label (do_error);
/* Expand the ubsan builtin call. */
expand_normal (fn);
+ do_pending_stack_adjust ();
/* We're done. */
emit_label (done_label);