[Bug 1915640] [NEW] internal compiler error while compiling system headers as modules
Alexander Lelyakin
1915640 at bugs.launchpad.net
Sun Feb 14 09:25:52 UTC 2021
Public bug reported:
Issue following three commands in empty directory:
--------------
g++-11 -std=c++20 -fmodules-ts -x c++-system-header iostream
g++-11 -std=c++20 -fmodules-ts -x c++-system-header utility
g++-11 -std=c++20 -fmodules-ts -x c++-system-header algorithm
----------------
The third command results in:
-------------------------
/usr/include/c++/11/bits/iterator_concepts.h:919:54: internal compiler error: tree check: expected binding_vector, have overload in maybe_record_mergeable_decl, at cp/name-lookup.c:3562
919 | operator==(unreachable_sentinel_t, const _It&) noexcept
| ^~~~~~~~
0xe33760 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
../../src/gcc/tree.c:9814
0xbfb767 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../src/gcc/tree.h:3349
0xbfb767 maybe_record_mergeable_decl
../../src/gcc/cp/name-lookup.c:3562
0x5ea899 do_pushdecl
../../src/gcc/cp/name-lookup.c:3864
0x12d067d do_pushdecl_with_scope
../../src/gcc/cp/name-lookup.c:4886
0x12d2fc7 pushdecl_namespace_level(tree_node*, bool)
../../src/gcc/cp/name-lookup.c:6250
0x14328dc push_template_decl(tree_node*, bool)
../../src/gcc/cp/pt.c:6052
0x192e00e do_friend(tree_node*, tree_node*, tree_node*, tree_node*, overload_flags, bool)
../../src/gcc/cp/friend.c:608
0x134810d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**)
../../src/gcc/cp/decl.c:13600
0x13a4d39 grokmethod(cp_decl_specifier_seq*, cp_declarator const*, tree_node*)
../../src/gcc/cp/decl.c:17476
0x13a4450 cp_parser_save_member_function_body
../../src/gcc/cp/parser.c:30580
0x133881c cp_parser_init_declarator
../../src/gcc/cp/parser.c:21557
0x140decf cp_parser_single_declaration
../../src/gcc/cp/parser.c:30434
0x762047 cp_parser_template_declaration_after_parameters
../../src/gcc/cp/parser.c:30006
0x7543ea cp_parser_explicit_template_declaration
../../src/gcc/cp/parser.c:30272
0x1342784 cp_parser_member_specification_opt
../../src/gcc/cp/parser.c:25734
0x1342784 cp_parser_class_specifier_1
../../src/gcc/cp/parser.c:24818
0x13334c0 cp_parser_class_specifier
../../src/gcc/cp/parser.c:25128
0x13334c0 cp_parser_type_specifier
../../src/gcc/cp/parser.c:18381
0x1331cee cp_parser_decl_specifier_seq
../../src/gcc/cp/parser.c:15003
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-11/README.Bugs> for instructions.
----------------------
g++-11 (Ubuntu 11-20210203-0ubuntu1) 11.0.0 20210203 (experimental) [master revision e8c87bc07b5:def4749fcba:84110515b93a6709de24240d6658ac207db5129f]
Copyright (C) 2021 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.
** Affects: gcc-11 (Ubuntu)
Importance: Undecided
Status: New
** Tags: c++20 modules
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-11 in Ubuntu.
https://bugs.launchpad.net/bugs/1915640
Title:
internal compiler error while compiling system headers as modules
Status in gcc-11 package in Ubuntu:
New
Bug description:
Issue following three commands in empty directory:
--------------
g++-11 -std=c++20 -fmodules-ts -x c++-system-header iostream
g++-11 -std=c++20 -fmodules-ts -x c++-system-header utility
g++-11 -std=c++20 -fmodules-ts -x c++-system-header algorithm
----------------
The third command results in:
-------------------------
/usr/include/c++/11/bits/iterator_concepts.h:919:54: internal compiler error: tree check: expected binding_vector, have overload in maybe_record_mergeable_decl, at cp/name-lookup.c:3562
919 | operator==(unreachable_sentinel_t, const _It&) noexcept
| ^~~~~~~~
0xe33760 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
../../src/gcc/tree.c:9814
0xbfb767 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../src/gcc/tree.h:3349
0xbfb767 maybe_record_mergeable_decl
../../src/gcc/cp/name-lookup.c:3562
0x5ea899 do_pushdecl
../../src/gcc/cp/name-lookup.c:3864
0x12d067d do_pushdecl_with_scope
../../src/gcc/cp/name-lookup.c:4886
0x12d2fc7 pushdecl_namespace_level(tree_node*, bool)
../../src/gcc/cp/name-lookup.c:6250
0x14328dc push_template_decl(tree_node*, bool)
../../src/gcc/cp/pt.c:6052
0x192e00e do_friend(tree_node*, tree_node*, tree_node*, tree_node*, overload_flags, bool)
../../src/gcc/cp/friend.c:608
0x134810d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**)
../../src/gcc/cp/decl.c:13600
0x13a4d39 grokmethod(cp_decl_specifier_seq*, cp_declarator const*, tree_node*)
../../src/gcc/cp/decl.c:17476
0x13a4450 cp_parser_save_member_function_body
../../src/gcc/cp/parser.c:30580
0x133881c cp_parser_init_declarator
../../src/gcc/cp/parser.c:21557
0x140decf cp_parser_single_declaration
../../src/gcc/cp/parser.c:30434
0x762047 cp_parser_template_declaration_after_parameters
../../src/gcc/cp/parser.c:30006
0x7543ea cp_parser_explicit_template_declaration
../../src/gcc/cp/parser.c:30272
0x1342784 cp_parser_member_specification_opt
../../src/gcc/cp/parser.c:25734
0x1342784 cp_parser_class_specifier_1
../../src/gcc/cp/parser.c:24818
0x13334c0 cp_parser_class_specifier
../../src/gcc/cp/parser.c:25128
0x13334c0 cp_parser_type_specifier
../../src/gcc/cp/parser.c:18381
0x1331cee cp_parser_decl_specifier_seq
../../src/gcc/cp/parser.c:15003
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-11/README.Bugs> for instructions.
----------------------
g++-11 (Ubuntu 11-20210203-0ubuntu1) 11.0.0 20210203 (experimental) [master revision e8c87bc07b5:def4749fcba:84110515b93a6709de24240d6658ac207db5129f]
Copyright (C) 2021 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-11/+bug/1915640/+subscriptions
More information about the foundations-bugs
mailing list