re PR sanitizer/85213 (-fsanitize=undefined internal compiler error: in fold_convert_...
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Apr 2018 11:24:36 +0000 (13:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Apr 2018 11:24:36 +0000 (13:24 +0200)
commit5a98025d8fdd5274cd6e5573424504c60427c56a
tree75c14130ed8e38050878d33603b17007c92d9f8b
parent6ca838330b632ebbe339a65d194afb0d863ddc21
re PR sanitizer/85213 (-fsanitize=undefined internal compiler error: in fold_convert_loc, at fold-const.c:2402)

PR sanitizer/85213
* fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
look through SAVE_EXPRs with non-side-effects argument.  Adjust
recursive calls.
(fold_comparison): Adjust twoval_comparison_p caller, don't handle
save_p here.

* c-c++-common/ubsan/pr85213.c: New test.

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