From: Jason Merrill Date: Wed, 12 Aug 2015 18:08:45 +0000 (-0400) Subject: re PR c++/67104 (Constant expression factory function initializes std::array with... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd07e167b0782b004cd270ed586f245621b1dce0;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 07ed20ff628..e8008ce0140 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-08-12 Jason Merrill + PR c++/67104 + * constexpr.c (cxx_eval_array_reference): Fix typo. + PR c++/67104 * constexpr.c (cxx_eval_array_reference): Handle sparse CONSTRUCTORs. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index b6788c7a7c0..6048f062593 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -1709,7 +1709,7 @@ cxx_eval_array_reference (const constexpr_ctx *ctx, tree t, found = false; vec *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) {