https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85101
Bug ID: 85101 Summary: C++17 ICE in build_over_call, at cp/call.c:8149 Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: proski at gnu dot org Target Milestone: --- Today's gcc source from git. C++17 and C++2a are affected, C++14 is not. I was able to compile that code with the latest (at the time) gcc snapshot about a month ago, so it's probably a recent regression. gcc 7.3.1 can compile the code. Fedora 27 x86_64, all up-to-date, gcc compiled from git and installed to /opt/gcc $ /opt/gcc/bin/g++ -v Using built-in specs. COLLECT_GCC=/opt/gcc/bin/g++ COLLECT_LTO_WRAPPER=/opt/gcc/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/roskinp/src/gcc/configure --enable-languages=c++ --disable-multilib --prefix=/opt/gcc : (reconfigured) /home/roskinp/src/gcc/configure --enable-languages=c++ --disable-multilib --prefix=/opt/gcc : (reconfigured) /home/roskinp/src/gcc/configure --enable-languages=c++ --disable-multilib --prefix=/opt/gcc : (reconfigured) /home/roskinp/src/gcc/configure --enable-languages=c++ --disable-multilib --prefix=/opt/gcc : (reconfigured) /home/roskinp/src/gcc/configure --enable-languages=c++ --disable-multilib --prefix=/opt/gcc : (reconfigured) /home/roskinp/src/gcc/configure --enable-languages=c++ --disable-multilib --prefix=/opt/gcc Thread model: posix gcc version 8.0.1 20180327 (experimental) (GCC) $ /opt/gcc/bin/g++ -c Chrono.ii -std=c++17 /home/roskinp/chrono/Source/Utility/Chrono.cpp: In function ‘std::__cxx11::string VG::Utility::to_string(VG::Utility::Milliseconds)’: /home/roskinp/chrono/Source/Utility/Chrono.cpp:63:73: internal compiler error: in build_over_call, at cp/call.c:8149 "00" + to_string(milliseconds.count() % milliseconds::period::den)}; ^ 0x5a84d1 build_over_call /home/roskinp/src/gcc/gcc/cp/call.c:8143 0x7fa263 build_new_method_call_1 /home/roskinp/src/gcc/gcc/cp/call.c:9363 0x7fa263 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) /home/roskinp/src/gcc/gcc/cp/call.c:9438 0x7fadc3 build_special_member_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, int) /home/roskinp/src/gcc/gcc/cp/call.c:8966 0x8a99e3 expand_default_init /home/roskinp/src/gcc/gcc/cp/init.c:1887 0x8a99e3 expand_aggr_init_1 /home/roskinp/src/gcc/gcc/cp/init.c:2002 0x8aa349 build_aggr_init(tree_node*, tree_node*, int, int) /home/roskinp/src/gcc/gcc/cp/init.c:1742 0x85eebf build_aggr_init_full_exprs /home/roskinp/src/gcc/gcc/cp/decl.c:6273 0x85eebf check_initializer /home/roskinp/src/gcc/gcc/cp/decl.c:6422 0x876cbc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /home/roskinp/src/gcc/gcc/cp/decl.c:7127 0x91331b cp_parser_init_declarator /home/roskinp/src/gcc/gcc/cp/parser.c:19741 0x91a788 cp_parser_simple_declaration /home/roskinp/src/gcc/gcc/cp/parser.c:13059 0x91b598 cp_parser_block_declaration /home/roskinp/src/gcc/gcc/cp/parser.c:12884 0x91bfc9 cp_parser_declaration_statement /home/roskinp/src/gcc/gcc/cp/parser.c:12478 0x8fa533 cp_parser_statement /home/roskinp/src/gcc/gcc/cp/parser.c:10927 0x8fb4a0 cp_parser_statement_seq_opt /home/roskinp/src/gcc/gcc/cp/parser.c:11276 0x8fb577 cp_parser_compound_statement /home/roskinp/src/gcc/gcc/cp/parser.c:11230 0x91c615 cp_parser_implicitly_scoped_statement /home/roskinp/src/gcc/gcc/cp/parser.c:12533 0x8fae5a cp_parser_selection_statement /home/roskinp/src/gcc/gcc/cp/parser.c:11416 0x8fae5a cp_parser_statement /home/roskinp/src/gcc/gcc/cp/parser.c:10818