PR sanitizer/85213
commitecf5c5cd52cf93bc3b4025a913e7c56b29d95f99
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2018 11:24:36 +0000 (6 11:24 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2018 11:24:36 +0000 (6 11:24 +0000)
tree75c14130ed8e38050878d33603b17007c92d9f8b
parentdf03ebc3574a0d7893127e3b9754a01abf2d8b70
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259167 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr85213.c [new file with mode: 0644]