Evaluate a SAVE_EXPR before an UBSAN check (PR sanitizer/80350).
authorMartin Liska <mliska@suse.cz>
Mon, 10 Apr 2017 07:29:29 +0000 (09:29 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 10 Apr 2017 07:29:29 +0000 (07:29 +0000)
commit3ee0fb02bb5164817f9ec9e40f9eccde78b6e10b
tree31af896cdb1e309a27a9f50375a1da7ebc7ee096
parent167a5b77978fd30959290d5649d96534ae8db9a3
Evaluate a SAVE_EXPR before an UBSAN check (PR sanitizer/80350).

2017-04-10  Martin Liska  <mliska@suse.cz>

PR sanitizer/80350
* c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
doing an UBSAN check.
2017-04-10  Martin Liska  <mliska@suse.cz>

PR sanitizer/80350
* c-c++-common/ubsan/pr80350.c: New test.

From-SVN: r246799
gcc/c-family/ChangeLog
gcc/c-family/c-ubsan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr80350.c [new file with mode: 0644]