On Sat, Dec 14, 2013 at 02:38:31AM +0100, Marek Polacek wrote:
> I noticed this bug a while ago on ppc64 and now I reproduced it even
> on x86_64 with -m32.  The problem was that we were using add_optab even
> when dealing with MINUS_EXPR; we should use sub_optab instead.
> 
> Regtested on x86_64-linux (with both -m32/-m64), ok for trunk?
> 
> 2013-12-14  Marek Polacek  <pola...@redhat.com>
> 
>       PR sanitizer/59503
>       * internal-fn.c (ubsan_expand_si_overflow_addsub_check): Call
>       expand_binop with correct optab depending on code.
> testsuite/
>       * c-c++-common/ubsan/pr59503.c: New test.

Sure.

        Jakub

Reply via email to