https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68782
--- Comment #3 from Jason Merrill <jason at redhat dot com> --- On 12/14/2015 01:45 PM, jakub at gcc dot gnu.org wrote: > I think the problem is constexpr.c creates invalid trees, in particular > CONSTRUCTORs that have non-TREE_CONSTANT elements, yet they have TREE_CONSTANT > set on them (and possibly also TREE_SIDE_EFFECTS similarly). Hmm, any element without TREE_CONSTANT should have caused us to return the original CONSTRUCTOR. > build_constructor with NULL vals creates TREE_CONSTANT and !TREE_SIDE_EFFECTS > CONSTRUCTOR, and constexpr.c later modifies the elts without updating those > flags. > > is untested fix that cures this testcase, but the cxx_eval_bare_aggregate > changes are incomplete, there are other ways how a new elt is stored too. Or > perhaps it could just in another loop go over all elements and compute those > flags. Jason, any thoughts on this? I thought there was already a function to recompute these flags, but I'm not finding it. Jason