Commit bd07e167 by Jason Merrill Committed by Jason Merrill

re PR c++/67104 (Constant expression factory function initializes std::array…

re PR c++/67104 (Constant expression factory function initializes std::array with static storage duration strangely)

	PR c++/67104
	* constexpr.c (cxx_eval_array_reference): Fix typo.

From-SVN: r226833
parent 3b9997bb
2015-08-12 Jason Merrill <jason@redhat.com>
PR c++/67104
* constexpr.c (cxx_eval_array_reference): Fix typo.
PR c++/67104
* constexpr.c (cxx_eval_array_reference): Handle sparse
CONSTRUCTORs.
......
......@@ -1709,7 +1709,7 @@ cxx_eval_array_reference (const constexpr_ctx *ctx, tree t,
found = false;
vec<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (ary);
constructor_elt *e;
for (unsigned ix = 0; vec_safe_iterate (v, ix, &e); ++i)
for (unsigned ix = 0; vec_safe_iterate (v, ix, &e); ++ix)
{
if (TREE_CODE (e->index) == RANGE_EXPR)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment