https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91867
Haoxin Tu <haoxintu at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |haoxintu at gmail dot com --- Comment #4 from Haoxin Tu <haoxintu at gmail dot com> --- I also find this in a simple code. test.cc include<iostream> int main(){ for(int i:{}); } $g++ --version g++ (GCC) 10.0.1 20200420 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $g++ -fconcepts -std=c++11 test.cc test.cc: In function ‘int main()’: test.cc:3:13: internal compiler error: in type_unification_real, at cp/pt.c:21752 3 | for(int i:{}); | ^ 0x6bf3ed type_unification_real ../../gcc/cp/pt.c:21752 0xa427ff do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ../../gcc/cp/pt.c:28954 0x9e4025 build_range_temp ../../gcc/cp/parser.c:12516 0x9ee792 cp_convert_range_for(tree_node*, tree_node*, tree_node*, tree_node*, unsigned int, bool, unsigned short) ../../gcc/cp/parser.c:12616 0x9f40b0 cp_parser_range_for ../../gcc/cp/parser.c:12498 0xa1ea0a cp_parser_for ../../gcc/cp/parser.c:12354 0xa1ea0a cp_parser_iteration_statement ../../gcc/cp/parser.c:12902 0xa00ccd cp_parser_statement ../../gcc/cp/parser.c:11353 0xa022d8 cp_parser_statement_seq_opt ../../gcc/cp/parser.c:11835 0xa023b8 cp_parser_compound_statement ../../gcc/cp/parser.c:11785 0xa198b5 cp_parser_function_body ../../gcc/cp/parser.c:23060 0xa198b5 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.c:23111 0xa1cbed cp_parser_function_definition_after_declarator ../../gcc/cp/parser.c:28993 0xa1dbd9 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.c:28909 0xa1dbd9 cp_parser_init_declarator ../../gcc/cp/parser.c:20667 0x9fe992 cp_parser_simple_declaration ../../gcc/cp/parser.c:13731 0xa27ba2 cp_parser_declaration ../../gcc/cp/parser.c:13430 0xa2832a cp_parser_translation_unit ../../gcc/cp/parser.c:4731 0xa2832a c_parse_file() ../../gcc/cp/parser.c:43972 0xb3d5eb c_common_parse_file() ../../gcc/c-family/c-opts.c:1190 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.