https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66536
Bug ID: 66536 Summary: [5/6 Regression] ICE in build_ctor_subob_ref, at cp/tree.c:2534 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- trippels@gcc2-power8 test % cat array.ii template <typename> struct make_impl; struct Tuple; template <> struct make_impl<Tuple> {}; struct A { template <typename X> auto operator()(X) { return make_impl<Tuple>(); } }; template <typename> A make; template <typename _Tp, int> struct array { _Tp _M_elems; }; struct Tracked { Tracked(int); }; struct B { Tracked tracker{0}; }; template <int> using ct_eq = B; auto eq_arrays = make<Tuple>(array<ct_eq<0>, 0>{}); trippels@gcc2-power8 test % clang++ -c -std=c++14 array.ii trippels@gcc2-power8 test % c++ -c -std=c++14 array.ii array.ii:16:50: internal compiler error: in build_ctor_subob_ref, at cp/tree.c:2534 auto eq_arrays = make<Tuple>(array<ct_eq<0>, 0>{}); ^ 0x1039446b build_ctor_subob_ref(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/tree.c:2533 0x10394703 replace_placeholders_r ../../gcc/gcc/cp/tree.c:2579 0x10dbc523 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hashset_traits>*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hashset_traits>*)) ../../gcc/gcc/tree.c:11176 0x10dbcd63 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hashset_traits>*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hashset_traits>*)) ../../gcc/gcc/tree.c:11390 0x1039490b replace_placeholders(tree_node*, tree_node*) ../../gcc/gcc/cp/tree.c:2604 0x1024bb23 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/gcc/cp/typeck2.c:841 0x10197bc7 check_initializer ../../gcc/gcc/cp/decl.c:6010 0x101c77cf cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6622 0x102f7de3 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:17316 0x102fad43 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11608 0x102f26e7 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11482 0x102ffc8f cp_parser_declaration ../../gcc/gcc/cp/parser.c:11379 0x102fdc2f cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:11265 0x102fe013 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4100 0x102fe013 c_parse_file() ../../gcc/gcc/cp/parser.c:33241 0x10493d6b c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1061 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.