re PR sanitizer/70135 (-fsanitize=undefined causes static_assert to fail)
authorJakub Jelinek <jakub@redhat.com>
Tue, 8 Mar 2016 20:05:21 +0000 (21:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 8 Mar 2016 20:05:21 +0000 (21:05 +0100)
commitd259b234a301aa5c06ca78262ae814b3d8d0f1a5
tree897ce2c797917765609e86f7a7499d60e9903ecf
parent56aae4b7c0d088f2b1056b41ba1f502d93550020
re PR sanitizer/70135 (-fsanitize=undefined causes static_assert to fail)

PR c++/70135
* constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs
even after the last iteration of the loop.

* g++.dg/cpp1y/constexpr-loop4.C: New test.
* g++.dg/ubsan/pr70135.C: New test.

From-SVN: r234064
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-loop4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/pr70135.C [new file with mode: 0644]