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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
And the difference is that with -fsanitize=integer-divide-by-zero we'll do
this:
5257   if (sanitize_flags_p ((SANITIZE_SHIFT
5258                          | SANITIZE_DIVIDE | SANITIZE_FLOAT_DIVIDE))
5259       && !processing_template_decl 
5260       && (doing_div_or_mod || doing_shift))
5261     {
5262       /* OP0 and/or OP1 might have side-effects.  */
5263       op0 = cp_save_expr (op0);
5264       op1 = cp_save_expr (op1);

so in .original there's
(void) (s = (short int) (NON_LVALUE_EXPR <SAVE_EXPR <-(int) uc + 2147483647>>))
instead of
(void) (s = (short int) ~(unsigned short) uc)

Reply via email to