]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/constexpr.c
PR c++/70135
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Mar 2016 20:05:21 +0000 (20:05 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Mar 2016 20:05:21 +0000 (20:05 +0000)
commit5370eb8d6625405bf3a2877ae04fd0f9171da3d6
tree897ce2c797917765609e86f7a7499d60e9903ecf
parentfe4bc12362e8be94ac5f11b14de473002aea3cf5
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234064 138bc75d-0d04-0410-961f-82ee72b054a4
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]