re PR c++/67104 (Constant expression factory function initializes std::array with...
authorJason Merrill <jason@redhat.com>
Wed, 12 Aug 2015 18:08:45 +0000 (14:08 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 12 Aug 2015 18:08:45 +0000 (14:08 -0400)
PR c++/67104
* constexpr.c (cxx_eval_array_reference): Fix typo.

From-SVN: r226833

gcc/cp/ChangeLog
gcc/cp/constexpr.c

index 07ed20ff628fe4dc6ae824074de6a0de5dfb117a..e8008ce0140a5369d4884e2edb1f03cbedf34072 100644 (file)
@@ -1,5 +1,8 @@
 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.
index b6788c7a7c0a2a9e146ac92e21b3dd9234860199..6048f0625934bba295d6a882a1d70cc1be01f6d6 100644 (file)
@@ -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)
            {