PR c++/84925
* pt.c (enclosing_instantiation_of): Check if fn is null.
+ PR c++/84927
+ * constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags
+ as we evaluate the elements.
+ (cxx_eval_constant_expression): Verify constructor's flags
+ unconditionally.
+
2018-03-16 Jason Merrill <jason@redhat.com>
PR c++/71834 - template-id with too few arguments.
(*p)->last().value = elt;
}
else
- CONSTRUCTOR_APPEND_ELT (*p, index, elt);
+ {
+ CONSTRUCTOR_APPEND_ELT (*p, index, elt);
+ /* Adding an element might change the ctor's flags. */
+ TREE_CONSTANT (ctx->ctor) = constant_p;
+ TREE_SIDE_EFFECTS (ctx->ctor) = side_effects_p;
+ }
}
if (*non_constant_p || !changed)
return t;
{
/* Don't re-process a constant CONSTRUCTOR, but do fold it to
VECTOR_CST if applicable. */
- /* FIXME after GCC 6 branches, make the verify unconditional. */
- if (CHECKING_P)
- verify_constructor_flags (t);
- else
- recompute_constructor_flags (t);
+ verify_constructor_flags (t);
if (TREE_CONSTANT (t))
return fold (t);
}
PR c++/84925
* g++.dg/cpp1z/lambda-__func__.C: New test.
+ PR c++/84927
+ * g++.dg/cpp1y/nsdmi-aggr9.C: New test.
+
2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/78651