re PR sanitizer/81065 (UBSAN: false positive as a result of distribution involving...
authorRichard Biener <rguenther@suse.de>
Tue, 13 Jun 2017 07:07:08 +0000 (07:07 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 13 Jun 2017 07:07:08 +0000 (07:07 +0000)
commit4f2c198d7675168416b8c994467d2941bfa5a309
treeb55bb2ec58b8a6522fbeaa63b5db22e702c496a2
parentcd34e54306bfb2ef53fbb2405de435e375337ef9
re PR sanitizer/81065 (UBSAN: false positive as a result of distribution involving different types)

2017-06-13  Richard Biener  <rguenther@suse.de>

PR middle-end/81065
* fold-const.c (extract_muldiv_1): Remove bogus distribution
case of C * (x * C2 + C3).
(fold_addr_of_array_ref_difference): Properly fold index difference.

* c-c++-common/ubsan/pr81065.c: New testcase.

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