https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83481
Bug ID: 83481 Summary: ICE in const-ref structured bindings. Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: antanubis at gmail dot com Target Milestone: --- Created attachment 42913 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42913&action=edit preprocessed source file Preprocessed source is attached. This command: g++ -x c++-cpp-output -std=c++1z -c file_upload.i -o file_upload.o on Ubuntu 14.04 with "g++ (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0" gives this output: /home/preston/Telegram/tdesktop/Telegram/SourceFiles/storage/file_upload.cpp: In member function ‘void Storage::Uploader::clear()’: /home/preston/Telegram/tdesktop/Telegram/SourceFiles/storage/file_upload.cpp:325:46: internal compiler error: Segmentation fault for (const auto &[requestId, requestData] : requestsSent) { ^~~~~~~~~~~~ 0xadf5cf crash_signal ../../src/gcc/toplev.c:337 0x5ae610 vec<tree_node*, va_gc, vl_embed>::iterate(unsigned int, tree_node**) const ../../src/gcc/vec.h:773 0x5ae610 find_decomp_class_base ../../src/gcc/cp/decl.c:7246 0x5cb7ed cp_finish_decomp(tree_node*, tree_node*, unsigned int) ../../src/gcc/cp/decl.c:7590 0x62bfae cp_convert_range_for(tree_node*, tree_node*, tree_node*, tree_node*, unsigned int, bool) ../../src/gcc/cp/parser.c:11745 0x648781 cp_parser_range_for ../../src/gcc/cp/parser.c:11577 0x655d87 cp_parser_for ../../src/gcc/cp/parser.c:11448 0x655d87 cp_parser_iteration_statement ../../src/gcc/cp/parser.c:11981 0x634689 cp_parser_statement ../../src/gcc/cp/parser.c:10575 0x635b8d cp_parser_statement_seq_opt ../../src/gcc/cp/parser.c:11040 0x635c37 cp_parser_compound_statement ../../src/gcc/cp/parser.c:10994 0x6469c0 cp_parser_function_body ../../src/gcc/cp/parser.c:21455 0x6469c0 cp_parser_ctor_initializer_opt_and_function_body ../../src/gcc/cp/parser.c:21493 0x64d2f0 cp_parser_function_definition_after_declarator ../../src/gcc/cp/parser.c:26284 0x651aad cp_parser_function_definition_from_specifiers_and_declarator ../../src/gcc/cp/parser.c:26196 0x651aad cp_parser_init_declarator ../../src/gcc/cp/parser.c:19182 0x651e9d cp_parser_simple_declaration ../../src/gcc/cp/parser.c:12786 0x652b15 cp_parser_block_declaration ../../src/gcc/cp/parser.c:12611 0x6312d4 cp_parser_declaration ../../src/gcc/cp/parser.c:12509 0x6570ab cp_parser_declaration_seq_opt ../../src/gcc/cp/parser.c:12385 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.