diff options
author | Jason Merrill <jason@redhat.com> | 2015-08-12 14:08:45 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-08-12 14:08:45 -0400 |
commit | bd07e167b0782b004cd270ed586f245621b1dce0 (patch) | |
tree | fd28591ea72ae43f0e97d222238df6d578c92bdf /gcc/cp | |
parent | 3b9997bbaf04d8a8588d45f7a8be201bb8358ca9 (diff) | |
download | gcc-bd07e167b0782b004cd270ed586f245621b1dce0.zip gcc-bd07e167b0782b004cd270ed586f245621b1dce0.tar.gz gcc-bd07e167b0782b004cd270ed586f245621b1dce0.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/constexpr.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 07ed20f..e8008ce 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,9 @@ 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. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index b6788c7..6048f06 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<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) { |