From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58272385800F; Mon, 18 Jan 2021 08:31:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58272385800F From: "boris at kolpackov dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98719] New: [modules] translating importable standard headers causes various ICEs Date: Mon, 18 Jan 2021 08:31:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: boris at kolpackov dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2021 08:31:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98719 Bug ID: 98719 Summary: [modules] translating importable standard headers causes various ICEs Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: boris at kolpackov dot net Target Milestone: --- Created attachment 49989 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49989&action=3Dedit build transcript An attempt to enable include translation for all the importable standard headers (http://eel.is/c++draft/library#headers-4) causes various internal compiler errors. Here are a few examples: Trying to translate from a top-level include: c++ ../../gcc-install/include/c++/11.0.0/h{type_traits} c++ ../../gcc-install/include/c++/11.0.0/h{concepts} c++ ../../gcc-install/include/c++/11.0.0/h{compare} In file included from /home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/b= its/stl_iterator_base_types.h:71, from /home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/b= its/stl_algobase.h:65, from /home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/b= its/char_traits.h:39, from /home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/s= tring:40: /home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/b= its/iterator_concepts.h:34: internal compiler error: in set_filename, at cp/module.cc:19081 34 | | 0xc69be8 module_state::set_filename(Cody::Packet const&) ../../gcc/gcc/cp/module.cc:19081 0xc69e4f maybe_translate_include ../../gcc/gcc/cp/module.cc:19124 0x2bfcda7 _cpp_stack_file ../../gcc/libcpp/files.c:912 0x2bfd420 _cpp_stack_include ../../gcc/libcpp/files.c:1104 0x2bf15ea do_include_common ../../gcc/libcpp/directives.c:853 0x2bf1642 do_include ../../gcc/libcpp/directives.c:865 0x2bf0bc0 _cpp_handle_directive ../../gcc/libcpp/directives.c:541 0x2c094d1 cpp_directive_only_process(cpp_reader*, void*, void (*)(cpp_reade= r*, CPP_DO_task, void*, ...)) ../../gcc/libcpp/lex.c:4393 0xf11c8e scan_translation_unit_directives_only ../../gcc/gcc/c-family/c-ppoutput.c:402 0xf11158 preprocess_file(cpp_reader*) ../../gcc/gcc/c-family/c-ppoutput.c:100 0xf0b6e4 c_common_init() ../../gcc/gcc/c-family/c-opts.c:1188 0xbe4d7b cxx_init() ../../gcc/gcc/cp/lex.c:332 0x1805e47 lang_dependent_init ../../gcc/gcc/toplev.c:1881 0x18066f9 do_compile ../../gcc/gcc/toplev.c:2178 Trying to translate from a top-level include: c++ ../../gcc-install/include/c++/11.0.0/h{iosfwd} c++ ../../gcc-install/include/c++/11.0.0/h{typeinfo} c++ ../../gcc-install/include/c++/11.0.0/h{new} c++ ../../gcc-install/include/c++/11.0.0/h{type_traits} c++ ../../gcc-install/include/c++/11.0.0/h{exception} /home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/e= xception: internal compiler error: in write_cluster, at cp/module.cc:14563 0xc5b52c module_state::write_cluster(elf_out*, depset**, unsigned int, depset::hash&, unsigned int*, unsigned int*) ../../gcc/gcc/cp/module.cc:14562 0xc65808 module_state::write(elf_out*, cpp_reader*) ../../gcc/gcc/cp/module.cc:17691 0xc6bbfd finish_module_processing(cpp_reader*) ../../gcc/gcc/cp/module.cc:19747 0xb8a7a1 c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.c:5178 0xf0b805 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1233 The build transcripts for these two cases are attached.=