re PR sanitizer/80932 (UBSAN: false positive as a result of distribution: c1*(c2...
authorMarek Polacek <polacek@redhat.com>
Wed, 7 Jun 2017 11:19:40 +0000 (11:19 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 7 Jun 2017 11:19:40 +0000 (11:19 +0000)
commit0874a778ec0adf43167dd4aa014dadb75b0907f8
treee331107548064bd858fc2e2c59ff591607aa438a
parent55e872a462ca506350140451ad4a170d6baa462b
re PR sanitizer/80932 (UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2)

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.

From-SVN: r248961
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr80932.c [new file with mode: 0644]