On 12/14/13 00:55, Jakub Jelinek wrote:
Hi!
This patch on top of the
http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00500.html
Hmm, this looks like it was missed review-wise.
ISTM we're getting a bit late in the process for this kind of thing.
But it's so well contained in the sanitization code it's hard to say no
:-) Prerequisite approved.
patch adds multiplication overflow checking for the missing cases (modes
which don't have 2x wider supported mode so we can't do a widening multiply
to the wider mode or full wider mode multiplication, but we at least
have 2x narrower mode).
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2013-12-14 Jakub Jelinek <ja...@redhat.com>
* predict.h (PROB_LIKELY): Fix the value.
* internal-fn.c (ubsan_expand_si_overflow_mul_check): Add support
for overflow checking for modes without 2xwider supported mode,
if the mode has 2xnarrower mode.
* c-c++-common/ubsan/overflow-mul-3.c: New test.
* c-c++-common/ubsan/overflow-mul-4.c: New test.
OK as well.
Jeff