re PR tree-optimization/64006 (__builtin_mul_overflow fails to signal overflow)
authorJakub Jelinek <jakub@redhat.com>
Fri, 21 Nov 2014 20:41:37 +0000 (21:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 21 Nov 2014 20:41:37 +0000 (21:41 +0100)
commit09877e133f3ca9c11a4334707d780a7b1a018bca
tree77c4e0749d73de62a9cf49723dd7c628028194a5
parenteb23df59649fc1e64937f9fd630cdc3e89fa6181
re PR tree-optimization/64006 (__builtin_mul_overflow fails to signal overflow)

PR tree-optimization/64006
* tree-vrp.c (stmt_interesting_for_vrp): Return true
for {ADD,SUB,MUL}_OVERFLOW internal calls.
(vrp_visit_assignment_or_call): For {ADD,SUB,MUL}_OVERFLOW
internal calls, check if any REALPART_EXPR/IMAGPART_EXPR
immediate uses would change their value ranges and return
SSA_PROP_INTERESTING if so, or SSA_PROP_NOT_INTERESTING
if there are some REALPART_EXPR/IMAGPART_EXPR immediate uses
interesting for vrp.

* gcc.c-torture/execute/pr64006.c: New test.

From-SVN: r217945
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr64006.c [new file with mode: 0644]
gcc/tree-vrp.c