re PR middle-end/81088 (UBSAN: false positive as a result of reassosiation)
authorRichard Biener <rguenther@suse.de>
Wed, 14 Jun 2017 11:40:20 +0000 (11:40 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 14 Jun 2017 11:40:20 +0000 (11:40 +0000)
commit909263f855ae056b49b8fbbbcf594d7e9b90b434
tree438e6ca62418d179e447ddb69fbd318488a45f11
parentc74985e3ee7f30091582908b1bdf3cdec5218897
re PR middle-end/81088 (UBSAN: false positive as a result of reassosiation)

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

PR middle-end/81088
* fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
literal constants.
(fold_binary_loc): When associating do not treat pre-existing
TREE_OVERFLOW on literal constants as a reason to allow
TREE_OVERFLOW on associated literal constants.

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

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