+2018-03-21 Marek Polacek <polacek@redhat.com>
+
+ PR c++/71638, ICE with NSDMI and reference.
+ * constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags
+ even when we replace an element.
+
2018-03-20 Marek Polacek <polacek@redhat.com>
PR c++/84978, ICE with NRVO.
gcc_assert (is_empty_class (TREE_TYPE (TREE_TYPE (index))));
changed = true;
}
- else if (new_ctx.ctor != ctx->ctor)
- {
- /* We appended this element above; update the value. */
- gcc_assert ((*p)->last().index == index);
- (*p)->last().value = elt;
- }
else
{
- CONSTRUCTOR_APPEND_ELT (*p, index, elt);
- /* Adding an element might change the ctor's flags. */
+ if (new_ctx.ctor != ctx->ctor)
+ {
+ /* We appended this element above; update the value. */
+ gcc_assert ((*p)->last().index == index);
+ (*p)->last().value = elt;
+ }
+ else
+ CONSTRUCTOR_APPEND_ELT (*p, index, elt);
+ /* Adding or replacing an element might change the ctor's flags. */
TREE_CONSTANT (ctx->ctor) = constant_p;
TREE_SIDE_EFFECTS (ctx->ctor) = side_effects_p;
}
+2018-03-21 Marek Polacek <polacek@redhat.com>
+
+ PR c++/71638, ICE with NSDMI and reference.
+ * g++.dg/cpp0x/nsdmi14.C: New test.
+ * g++.dg/cpp1y/nsdmi-aggr10.C: New test.
+
2018-03-21 Chenghua Xu <paul.hua.gm@gmail.com>
* gcc.dg/vect/vect-strided-shift-1.c: Add dg-skip-if for