On 06/06/2017 04:31 AM, Marek Polacek wrote:
> Another case of extract_muldiv running off the rails.  Here it did a wrong
> distribution; turning 
> 
>   ((A * x) - (B * x)) * -6
> 
> into
> 
>   (A' * x) - (B' * x)
> 
> incurred an overflow in the subtraction.  The fix is essentially the same
> as what I did in sanitizer/80800.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk/7/6?
> 
> 2017-06-06  Marek Polacek  <pola...@redhat.com>
> 
>       PR sanitizer/80932
>       * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
>       TYPE_OVERFLOW_WRAPS check. 
> 
>       * c-c++-common/ubsan/pr80932.c: New test.
OK
jeff

Reply via email to