From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD78F3858C20; Mon, 14 Aug 2023 11:15:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD78F3858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692011740; bh=PCeRtLjxQPBZcfZDp5Foh3+EW6HSYQBz8is4rLgAq2w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xHX8WRL92fpUkduVOuwBUgy2K/XhbqJIaWpGabOUkyVOQpD+QYYYttZuFonwjyiGL II+ziD2brRmNPYy4HeQzsOwuXds5+MH9+g2ZajuEhe3Td7dPvH+ZVYBRX+u121abst A82W226BuTgDKr9jj1G3hIxmm3biw2MW36wkpeZI= From: "yagreg7 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108080] ICE: in core_vals, at cp/module.cc:6262 with -fmodule-header Date: Mon, 14 Aug 2023 11:15:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: yagreg7 at gmail dot com 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: cc Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108080 Gregory Dushkin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yagreg7 at gmail dot com --- Comment #5 from Gregory Dushkin --- I have a similar issue with GCC 13.2.1. The weird part about it is that it seems to depend on the exact value of some compiler flags rather than the actual source file content. I'm trying to use g++ to compile {fmt} as a mod= ule and this is what I get: When building with CMake the {fmt} itself (go to repository, `mkdir build; = cd build; cmake .. -DFMT_MODULE=3DON && make`, the command ``` /usr/bin/c++=20 -I/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/include -O3 -DNDEBUG -std=3Dgnu++20 -fvisibility=3Dhidden -fvisibility-inlines-hidden -fmodules-ts -MD -MT CMakeFiles/fmt.dir/src/fmt.cc.o -MF CMakeFiles/fmt.dir/src/fmt.cc.o.d -o CMakeFiles/fmt.dir/src/fmt.cc.o -c /home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc ``` executes successfully and the compilation is OK. However, when compiling {fmt} as a CMake subproject, the command is a little different: ``` cd /home/greg/projects/cpp/4seudo/build/_deps/fmt-build && /usr/bin/c++=20 -I/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/include -std=3Dc++20 -fmodules-ts -MD -MT _deps/fmt-build/CMakeFiles/fmt.dir/src/fm= t.cc.o -MF CMakeFiles/fmt.dir/src/fmt.cc.o.d -o CMakeFiles/fmt.dir/src/fmt.cc.o -c /home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc ``` And _this_ command fails with an ICE: ``` $ cd /home/greg/projects/cpp/4seudo/build/_deps/fmt-build && /usr/bin/c++=20 -I/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/include -std=3Dc++20 -fmodules-ts -MD -MT _deps/fmt-build/CMakeFiles/fmt.dir/src/fm= t.cc.o -MF CMakeFiles/fmt.dir/src/fmt.cc.o.d -o CMakeFiles/fmt.dir/src/fmt.cc.o -c /home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc -freport-bug /home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc:73:= 8: internal compiler error: in core_vals, at cp/module.cc:6262 73 | export module fmt; | ^~~~~~ 0x1ad33c8 internal_error(char const*, ...) ???:0 0x6b7b63 fancy_abort(char const*, int, char const*) ???:0 0x7c98b7 trees_out::tree_value(tree_node*) ???:0 0x7c763d trees_out::tree_node(tree_node*) ???:0 0x7c8806 trees_out::core_vals(tree_node*) ???:0 0x7c8d64 trees_out::tree_node_vals(tree_node*) ???:0 0x7c616b trees_out::decl_value(tree_node*, depset*) ???:0 0x7cb47f depset::hash::find_dependencies(module_state*) ???:0 0x7cc422 module_state::write_begin(elf_out*, cpp_reader*, module_state_conf= ig&, unsigned int&) ???:0 0x7dc105 finish_module_processing(cpp_reader*) ???:0 0x7714fd c_parse_final_cleanups() ???:0 0x9444b4 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See for instructions. Preprocessed source stored into /tmp/ccoSmHEM.out file, please attach this = to your bugreport. ``` Maybe there is an error in arguments parsing? I will be attaching ccoSmHEM.out to this issue now.=