https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122053
Bug ID: 122053
Summary: ICE in finish_member_declaration with modules
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
rm -rf gcm.cache; ~/src/gcc/obj44i/usr/local/bin/g++ -fmodules -O2 -std=c++26
std.cc -S; ~/src/gcc/obj44i/usr/local/bin/g++ -fmodules -O2 -std=c++26 inet.cc
-S
inet.cc:8:12: internal compiler error: in finish_member_declaration, at
cp/semantics.cc:4250
8 | __time_t tv_sec;
| ^~~~~~
0x318f98f internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:786
0xfbb337 fancy_abort(char const*, int, char const*)
../../gcc/diagnostics/context.cc:1803
0x896750 finish_member_declaration(tree_node*)
../../gcc/cp/semantics.cc:4250
0x11ee027 cp_parser_member_declaration
../../gcc/cp/parser.cc:30075
0x11b5a73 cp_parser_member_specification_opt
../../gcc/cp/parser.cc:29328
0x11b5a73 cp_parser_class_specifier
../../gcc/cp/parser.cc:28208
0x11b72ab cp_parser_type_specifier
../../gcc/cp/parser.cc:21255
0x11b7617 cp_parser_decl_specifier_seq
../../gcc/cp/parser.cc:17843
0x11eb45d cp_parser_simple_declaration
../../gcc/cp/parser.cc:16937
0x11f8f26 cp_parser_declaration
../../gcc/cp/parser.cc:16684
0x11fa46b cp_parser_toplevel_declaration
../../gcc/cp/parser.cc:16705
0x11fa46b cp_parser_translation_unit
../../gcc/cp/parser.cc:5505
0x11fa46b c_parse_file()
../../gcc/cp/parser.cc:55146
0x1372981 c_common_parse_file()
../../gcc/c-family/c-opts.cc:1418
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
cat std.cc
module;
#include <condition_variable>
export module std;
export namespace std
{
using std::condition_variable;
}
cat inet.cc
import std;
typedef long int __time_t;
typedef long int __syscall_slong_t;
struct timespec
{
__time_t tv_sec;
__syscall_slong_t tv_nsec;
};