https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98352
Bug ID: 98352 Summary: [9/10/11 Regression] ICE in implicitly_declare_fn, at cp/method.c:2914 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190217 and 20190224, and affects roughly a dozen testsuite files when running without -std=c++11 : $ cat z1_nsdmi-defer6.C struct A { int i = (A(), 42); }; A a; $ g++-11-20201213 -c z1_nsdmi-defer6.C -ansi z1_nsdmi-defer6.C:3:19: warning: non-static data member initializers only available with '-std=c++11' or '-std=gnu++11' 3 | int i = (A(), 42); | ^ z1_nsdmi-defer6.C:3:14: internal compiler error: in implicitly_declare_fn, at cp/method.c:2914 3 | int i = (A(), 42); | ^ 0x7f19a0 implicitly_declare_fn(special_function_kind, tree_node*, bool, tree_node*, tree_node*) ../../gcc/cp/method.c:2914 0x7f24a5 lazily_declare_fn(special_function_kind, tree_node*) ../../gcc/cp/method.c:3209 0x7ff9fc maybe_lazily_declare ../../gcc/cp/name-lookup.c:1922 0x7ff9fc get_class_binding(tree_node*, tree_node*, bool) ../../gcc/cp/name-lookup.c:1952 0x8f406b lookup_field_r ../../gcc/cp/search.c:978 0x8f2a4e dfs_walk_all(tree_node*, tree_node* (*)(tree_node*, void*), tree_node* (*)(tree_node*, void*), void*) ../../gcc/cp/search.c:1408 0x8f2bfc lookup_member(tree_node*, tree_node*, int, bool, int, access_failure_info*) ../../gcc/cp/search.c:1121 0x8f2fa0 lookup_fnfields(tree_node*, tree_node*, int, int) ../../gcc/cp/search.c:1327 0x6b1950 build_special_member_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, int) ../../gcc/cp/call.c:9958 0x7bc8f6 build_value_init(tree_node*, int) ../../gcc/cp/init.c:355 0x9745bd build_functional_cast_1 ../../gcc/cp/typeck2.c:2264 0x9745bd build_functional_cast(unsigned int, tree_node*, tree_node*, int) ../../gcc/cp/typeck2.c:2286 0x82f287 cp_parser_functional_cast ../../gcc/cp/parser.c:30524 0x843b92 cp_parser_postfix_expression ../../gcc/cp/parser.c:7417 0x858cf5 cp_parser_unary_expression ../../gcc/cp/parser.c:8808 0x8286ef cp_parser_cast_expression ../../gcc/cp/parser.c:9712 0x828fb1 cp_parser_binary_expression ../../gcc/cp/parser.c:9814 0x8299e0 cp_parser_assignment_expression ../../gcc/cp/parser.c:10118 0x82b409 cp_parser_expression ../../gcc/cp/parser.c:10288 0x840b4d cp_parser_primary_expression ../../gcc/cp/parser.c:5556