re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expres...
authorJakub Jelinek <jakub@redhat.com>
Thu, 13 Apr 2017 19:52:58 +0000 (21:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 13 Apr 2017 19:52:58 +0000 (21:52 +0200)
commit099560172fc6d46fcd7878043acab799d4fb044f
tree1df8de837fda91f9d1aeedcb2cca29b6d8d39d26
parentbc0423960365b4fc8caebdd5047ea4f993df6e9a
re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expression" message in / and % expr)

PR sanitizer/80403
* fold-const.c (fold_ternary_loc): Revert
use op0 instead of fold_convert_loc (loc, type, arg0) part of
2017-04-12 change.

* g++.dg/ubsan/pr80403-2.C: New test.

From-SVN: r246917
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr80403-2.C [new file with mode: 0644]