rtx target = NULL_RTX;
signop sign;
enum insn_code icode;
+ int save_flag_trapv = flag_trapv;
+ /* We don't want any __mulv?i3 etc. calls from the expansion of
+ these internal functions, so disable -ftrapv temporarily. */
+ flag_trapv = 0;
done_label = gen_label_rtx ();
do_error = gen_label_rtx ();
else
expand_arith_overflow_result_store (lhs, target, mode, res);
}
+ flag_trapv = save_flag_trapv;
}
/* Expand UBSAN_CHECK_* internal function if it has vector operands. */
rtx resvr = NULL_RTX;
unsigned HOST_WIDE_INT const_cnt = 0;
bool use_loop_p = (!cnt.is_constant (&const_cnt) || const_cnt > 4);
+ int save_flag_trapv = flag_trapv;
+ /* We don't want any __mulv?i3 etc. calls from the expansion of
+ these internal functions, so disable -ftrapv temporarily. */
+ flag_trapv = 0;
if (lhs)
{
optab op;
}
else if (resvr)
emit_move_insn (lhsr, resvr);
+ flag_trapv = save_flag_trapv;
}
/* Expand UBSAN_CHECK_ADD call STMT. */
prec0 = MIN (prec0, pr);
pr = get_min_precision (arg1, uns1_p ? UNSIGNED : SIGNED);
prec1 = MIN (prec1, pr);
+ int save_flag_trapv = flag_trapv;
+ /* We don't want any __mulv?i3 etc. calls from the expansion of
+ these internal functions, so disable -ftrapv temporarily. */
+ flag_trapv = 0;
/* If uns0_p && uns1_p, precop is minimum needed precision
of unsigned type to hold the exact result, otherwise
precop is minimum needed precision of signed type to
ops.location = loc;
rtx tem = expand_expr_real_2 (&ops, NULL_RTX, mode, EXPAND_NORMAL);
expand_arith_overflow_result_store (lhs, target, mode, tem);
+ flag_trapv = save_flag_trapv;
return;
}
if (integer_zerop (arg0) && !unsr_p)
{
expand_neg_overflow (loc, lhs, arg1, false, NULL);
+ flag_trapv = save_flag_trapv;
return;
}
/* FALLTHRU */
case MULT_EXPR:
expand_mul_overflow (loc, lhs, arg0, arg1, unsr_p,
unsr_p, unsr_p, false, NULL);
+ flag_trapv = save_flag_trapv;
return;
default:
gcc_unreachable ();
else
expand_mul_overflow (loc, lhs, arg0, arg1, unsr_p,
uns0_p, uns1_p, false, NULL);
+ flag_trapv = save_flag_trapv;
return;
}