re PR sanitizer/80536 (UBSAN: compile time segfault)
authorMarek Polacek <polacek@redhat.com>
Tue, 16 May 2017 19:25:04 +0000 (19:25 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 16 May 2017 19:25:04 +0000 (19:25 +0000)
commit6b6ae9eb9c06b6911573bb9a13cf98b5a7c98b78
tree5486db1bec43bb3ea03f57fcf8a6eebd9024844c
parentc0c248220bb16284fabcf996fcca87e44cd4a98a
re PR sanitizer/80536 (UBSAN: compile time segfault)

PR sanitizer/80536
PR sanitizer/80386
* cp-gimplify.c (cp_fold): Handle SAVE_EXPR.

* tree.c (save_expr): Don't fold the expression.

* c-c++-common/ubsan/pr80536.c: New test.
* g++.dg/ubsan/pr80386.C: New test.

From-SVN: r248124
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr80536.c [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/pr80386.C [new file with mode: 0644]
gcc/tree.c