internal compiler error while compiling system headers as modules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Fix Released
|
Medium
|
|||
gcc-11 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
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/
919 | operator=
| ^~~~~~~~
0xe33760 tree_check_
../../
0xbfb767 tree_check(
../../
0xbfb767 maybe_record_
../../
0x5ea899 do_pushdecl
../../
0x12d067d do_pushdecl_
../../
0x12d2fc7 pushdecl_
../../
0x14328dc push_template_
../../
0x192e00e do_friend(
../../
0x134810d grokdeclarator(
../../
0x13a4d39 grokmethod(
../../
0x13a4450 cp_parser_
../../
0x133881c cp_parser_
../../
0x140decf cp_parser_
../../
0x762047 cp_parser_
../../
0x7543ea cp_parser_
../../
0x1342784 cp_parser_
../../
0x1342784 cp_parser_
../../
0x13334c0 cp_parser_
../../
0x13334c0 cp_parser_
../../
0x1331cee cp_parser_
../../
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:/
-------
g++-11 (Ubuntu 11-20210203-
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.
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
Changed in gcc: | |
status: | In Progress → Fix Released |
seen with trunk 20210207, with an installed compiler, empty directory:
$ g++-11 -std=c++20 -fmodules-ts -x c++-system-header iostream c++/11/ bits/stl_ iterator_ base_types. h:71,
from /usr/include/ c++/11/ bits/stl_ algobase. h:65,
from /usr/include/ c++/11/ algorithm: 61: 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 =(unreachable_ sentinel_ t, const _It&) noexcept failed( tree_node const*, char const*, int, char const*, ...)
../../ src/gcc/ tree.c: 9814 tree_node* , char const*, int, char const*, tree_code)
../../ src/gcc/ tree.h: 3349 mergeable_ decl
../../ src/gcc/ cp/name- lookup. c:3562
../../ src/gcc/ cp/name- lookup. c:3864 with_scope
../../ src/gcc/ cp/name- lookup. c:4886 namespace_ level(tree_ node*, bool)
../../ src/gcc/ cp/name- lookup. c:6251 decl(tree_ node*, bool)
../../ src/gcc/ cp/pt.c: 6054 tree_node* , tree_node*, tree_node*, tree_node*, overload_flags, bool)
../../ src/gcc/ cp/friend. c:608 cp_declarator const*, cp_decl_ specifier_ seq*, decl_context, int, tree_node**)
../../ src/gcc/ cp/decl. c:13613 cp_decl_ specifier_ seq*, cp_declarator const*, tree_node*)
../../ src/gcc/ cp/decl. c:17489 save_member_ function_ body
../../ src/gcc/ cp/parser. c:30587 init_declarator
../../ src/gcc/ cp/parser. c:21557 single_ declaration
../../ src/gcc/ cp/parser. c:30441 template_ declaration_ after_parameter s
../../ src/gcc/ cp/parser. c:30013 explicit_ template_ declaration
../../ src/gcc/ cp/parser. c:30279 member_ specification_ opt
../../ src/gcc/ cp/parser. c:25740 class_specifier _1
../../ src/gcc/ cp/parser. c:24818 class_specifier
../../ src/gcc/ cp/parser. c:25134 type_specifier
../../ src/gcc/ cp/parser. c:18381 decl_specifier_ seq
../../ src/gcc/ cp/parser. c:15003
$ g++-11 -std=c++20 -fmodules-ts -x c++-system-header utility
$ g++-11 -std=c++20 -fmodules-ts -x c++-system-header algorithm
In file included from /usr/include/
/usr/include/
919 | operator=
| ^~~~~~~~
0xe2c617 tree_check_
0xbfc27c tree_check(
0xbfc27c maybe_record_
0x5ea96a do_pushdecl
0x12cad8d do_pushdecl_
0x12cd607 pushdecl_
0x142aeac push_template_
0x192f6fe do_friend(
0x13418db grokdeclarator(
0x139e169 grokmethod(
0x139d880 cp_parser_
0x1331fcc cp_parser_
0x1406b5f cp_parser_
0x761a2f cp_parser_
0x7544b0 cp_parser_
0x133bef4 cp_parser_
0x133bef4 cp_parser_
0x132c600 cp_parser_
0x132c600 cp_parser_
0x132b40e cp_parser_
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.