re PR c++/63928 (use after free in cp/constexpr.c)

PR c++/63928
	* constexpr.c (cxx_eval_store_expression): Return init, not *valp.

From-SVN: r217790
This commit is contained in:
Jason Merrill 2014-11-19 14:03:20 -05:00 committed by Jason Merrill
parent 92c66d8311
commit 3bdf0a9ba5
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-11-19 Jason Merrill <jason@redhat.com>
PR c++/63928
* constexpr.c (cxx_eval_store_expression): Return init, not *valp.
2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55425

View File

@ -2554,7 +2554,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t,
else if (addr)
return target;
else
return *valp;
return init;
}
/* Evaluate a ++ or -- expression. */