From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A3971385C6EA; Wed, 26 Jul 2023 13:37:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3971385C6EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690378666; bh=kCC5AGeJz/Y5I/RvddSilm5Kt6Ctrhf+9ZBFG2yzKWA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vJ+2AL2208KDX8/ZdLY4mQGSm1Fn/3JvsHy2kG8iloX1q36RJO4CZoDKys76UpR0I OMM1UVBtpUYFykIa/FYJR2EOX9jw3xf004e/HObFvbxYzszHkvvxzD/BU0Z2n1ef+l appze1Z468hd3so6GkVdNqksbybc7kQvZ5lPTwhY= From: "doko at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108080] ICE: in core_vals, at cp/module.cc:6262 with -fmodule-header Date: Wed, 26 Jul 2023 13:37:45 +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: doko at gcc dot gnu.org 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 Matthias Klose changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |doko at gcc dot gnu.org --- Comment #3 from Matthias Klose --- seen with trunk 20230718: $ cat foo.ii module; # 1 "" 1 3 namespace std { template struct hash; } typedef long unsigned size_t; namespace std { template struct pair { int second; template constexpr pair(); }; template void operator>(pair<_T1, _T2>, pair<_T1, _T2>); template struct __new_allocator { allocate___n() { allocate___n > this; } }; template using __allocator_base =3D __new_allocator<_Tp>; template struct allocator : __allocator_base { __attribute__allocator() {} }; template class allocator; template struct array; void get(array<1>); template template constexpr pair<_T1, _T2>::pair() : second(get) {} struct vector { friend hash; }; void swap(vector); template struct __uniq_ptr_impl { swap() { std::swap; } }; template struct unique_ptr { __uniq_ptr_impl pointer; }; struct shared_ptr { operator=3D(unique_ptr<>); }; struct __shared_ptr { friend shared_ptr; }; void operator=3D=3D(__shared_ptr, __shared_ptr); template struct array { size() { size =3D=3D 0; } }; } // namespace std #pragma GCC optimize "" namespace std { struct id { friend operator>(id, id); }; struct hash; } // namespace std # 7 "" 2 export module spdlog_wrapper; $ /usr/lib/gcc-snapshot/bin/g++ -std=3Dc++20 -fmodules-ts -Wall -c foo.ii foo.ii:7:8: internal compiler error: in core_vals, at cp/module.cc:6262 7 | namespace std { | ^~~~~~ 0x11e5613 trees_out::core_vals(tree_node*) ../../src/gcc/cp/module.cc:6262 0x11e6353 trees_out::tree_node_vals(tree_node*) ../../src/gcc/cp/module.cc:7218 0x11ec349 trees_out::tree_value(tree_node*) ../../src/gcc/cp/module.cc:9083 0x11e8faf trees_out::tree_node(tree_node*) ../../src/gcc/cp/module.cc:9281 0x11e59be trees_out::core_vals(tree_node*) ../../src/gcc/cp/module.cc:6171 0x11e6353 trees_out::tree_node_vals(tree_node*) ../../src/gcc/cp/module.cc:7218 0x11e6cb7 trees_out::decl_value(tree_node*, depset*) ../../src/gcc/cp/module.cc:7797 0x11ee50d depset::hash::find_dependencies(module_state*) ../../src/gcc/cp/module.cc:13328 0x11eea54 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&, unsigned int&) ../../src/gcc/cp/module.cc:17895 0x79f4e7 finish_module_processing(cpp_reader*) ../../src/gcc/cp/module.cc:20237 0x1bc5fd5 c_parse_final_cleanups() ../../src/gcc/cp/decl2.cc:5184 0x21034b1 c_common_parse_file() ../../src/gcc/c-family/c-opts.cc:1274 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report.=