https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Created attachment 38514
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38514&action=edit
slightly more reduced test case

We're invoking constexpr evaluation machinery after parsing is complete --
fini_constexpt has already been called.  This occurs during the emission of
BarContainer's constructor, after we've destructively gimplified MakeFoo.  We
end up in

0xa05bf2 maybe_constant_init(tree_node*, tree_node*)
        ../../../src/gcc/cp/constexpr.c:4457
0x929ce6 build_vec_init(tree_node*, tree_node*, tree_node*, bool, int, int)
        ../../../src/gcc/cp/init.c:4178
0x9db06b cp_gimplify_expr(tree_node**, gimple**, gimple**)
        ../../../src/gcc/cp/cp-gimplify.c:592

and from there we have const_expr_eval (Bar) -> const_expr_eval (MakeFoo) ->
ICE
The object we're gimplifying is a vec_init_expr

Reply via email to