https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68010
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work|5.2.1, 6.0 | Known to fail| |5.2.1, 6.0 --- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Reduced testcase ICEs with all supported versions: markus@x4 tmp % cat c.ii template <class _Container> auto begin(_Container __cont) -> decltype(__cont.begin()); template <class _Container> auto end(_Container __cont) -> decltype(__cont.end()); class A { public: int begin(); int end(); }; namespace boost {} namespace b = boost; namespace boost { template <typename, typename = int, typename = int, typename = int, typename = int> struct B; template <typename = int> struct C; template <typename, typename, typename, typename, typename> struct B {}; template <typename> struct C { typedef C base_type; template <typename Iterator_, typename T1_, typename T2_, typename T3_, typename T4_> C(B<Iterator_, T1_, T2_, T3_, T4_>); }; } template <typename Skipper> class StructDecoder : boost::C<Skipper> { public: StructDecoder() : StructDecoder::base_type(start_rule) { namespace bs = boost; using namespace bs; } b::B<Skipper> start_rule; }; namespace qi = boost; class D { public: D(int, int); }; struct F : qi::C<> { F(int, D func) : base_type(program), report_error(func) {} qi::B<int> program; StructDecoder<int> q_syslog_desc; D report_error; }; int NFGParserparse_tokens; void NFGParserparse() { A str; D error_report(begin(str), end(str)); F(NFGParserparse_tokens, error_report); } markus@x4 tmp % g++ -c -g -std=c++11 c.ii c.ii: In constructor ‘StructDecoder<Skipper>::StructDecoder() [with Skipper = int]’: c.ii:49:1: internal compiler error: in tree_to_shwi, at tree.c:7289 } ^ 0xf22ae2 tree_to_shwi(tree_node const*) ../../gcc/gcc/tree.c:7289 0x983033 add_data_member_location_attribute ../../gcc/gcc/dwarf2out.c:15480 0x98c748 gen_inheritance_die ../../gcc/gcc/dwarf2out.c:20345 0x98c748 gen_member_die ../../gcc/gcc/dwarf2out.c:20397 0x98c748 gen_struct_or_union_type_die ../../gcc/gcc/dwarf2out.c:20517 0x98c748 gen_tagged_type_die ../../gcc/gcc/dwarf2out.c:20718 0x98b1cd gen_type_die_with_usage ../../gcc/gcc/dwarf2out.c:20880 0x98c036 gen_type_die ../../gcc/gcc/dwarf2out.c:20935 0x9948fa modified_type_die ../../gcc/gcc/dwarf2out.c:10950 0x99404b force_type_die ../../gcc/gcc/dwarf2out.c:21265 0x99378d get_context_die ../../gcc/gcc/dwarf2out.c:21180 0x99378d force_decl_die ../../gcc/gcc/dwarf2out.c:21199 0x993894 get_context_die ../../gcc/gcc/dwarf2out.c:21183 0x993894 force_decl_die ../../gcc/gcc/dwarf2out.c:21199 0x98e2a7 dwarf2out_imported_module_or_decl_1 ../../gcc/gcc/dwarf2out.c:21752 0x98e592 process_scope_var ../../gcc/gcc/dwarf2out.c:21053 0x98e807 decls_for_scope ../../gcc/gcc/dwarf2out.c:21081 0x9a4b9d gen_lexical_block_die ../../gcc/gcc/dwarf2out.c:19950 0x9a4b9d gen_block_die ../../gcc/gcc/dwarf2out.c:21025 0x98e892 decls_for_scope ../../gcc/gcc/dwarf2out.c:21095