https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114795
Bug ID: 114795 Summary: internal compiler error: in finish_member_declaration after module import in gcc 14.0.1 snapshot Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: porten at kde dot org Target Milestone: --- This is with a gcc/g++ build created locally from the published snapshot package gcc-14-20240414.tar.xz. ---------- compiler info ---------- $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/opt/gcc-14/libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/porten/tmp/gcc-14-20240414/configure --disable-multilib --prefix=/opt/gcc-14 --enable-languages=c,c++ Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.1 20240414 (experimental) (GCC) ---------- Command triggering the bug ---------- g++ -std=c++2a -fmodules-ts -c url.cpp queue.cpp ---------- url.cpp ---------- module; #include <chrono> export module url; ---------- queue.cpp ---------- import url; #include <format> ---------- output ------------- In file included from /opt/gcc-14/include/c++/14.0.1/concepts:46, from /opt/gcc-14/include/c++/14.0.1/compare:40, from /opt/gcc-14/include/c++/14.0.1/array:38, from /opt/gcc-14/include/c++/14.0.1/format:43, from queue.cpp:3: /opt/gcc-14/include/c++/14.0.1/type_traits:89:36: error: template definition of non-template ‘constexpr const _Tp std::integral_constant<_Tp, __v>::value’ 89 | static constexpr _Tp value = __v; | ^~~ [ ... 7000 lines with compiler errors ... ] /opt/gcc-14/include/c++/14.0.1/optional:265:30: internal compiler error: in finish_member_declaration, at cp/semantics.cc:3840 265 | _Storage<_Stored_type> _M_payload; | ^~~~~~~~~~ 0x7fa7e1 finish_member_declaration(tree_node*) /home/porten/tmp/gcc-14-20240414/gcc/cp/semantics.cc:3840 0xc28be5 cp_parser_member_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:28497 0xbeef63 cp_parser_member_specification_opt /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:27840 0xbeef63 cp_parser_class_specifier /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:26845 0xbeef63 cp_parser_type_specifier /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:20064 0xbf094d cp_parser_decl_specifier_seq /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:16590 0xc25cfa cp_parser_single_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:33143 0xc2619c cp_parser_template_declaration_after_parameters /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:32799 0xc26a80 cp_parser_explicit_template_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:33072 0xc2b599 cp_parser_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:15502 0xc29c99 cp_parser_toplevel_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:15594 0xc29c99 cp_parser_declaration_seq_opt /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:15345 0xc2a13b cp_parser_namespace_body /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:22128 0xc2a13b cp_parser_namespace_definition /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:22106 0xc2b896 cp_parser_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:15553 0xc2bf8a cp_parser_toplevel_declaration /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:15594 0xc2bf8a cp_parser_translation_unit /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:5279 0xc2bf8a c_parse_file() /home/porten/tmp/gcc-14-20240414/gcc/cp/parser.cc:51268 0xd7ae41 c_common_parse_file() /home/porten/tmp/gcc-14-20240414/gcc/c-family/c-opts.cc:1311 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.