From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11BA63858CDB; Mon, 20 May 2024 17:15:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11BA63858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716225321; bh=j4qTfREEcdDDxU7g/jN1ZdozEsMETC/YO5t8305RWA8=; h=From:To:Subject:Date:From; b=Vez9OJiAA+7DVYspF+idCY4T2TDpft/p/AmAhf4SIUe0InsV8Q+HqHQtm1wagB5zE ISxZxSW84DMVBMZTbR8/Uj05UW43icLLy3kHc0llIhr8QzqNW+NnPvTJ1k0Tyj1syi 2qdRdkxMU0IMPis5DQJ25Gj8cAOLfSAZ6kV33oec= From: "porten at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115165] New: ICE on -ftime-report with module and c++2b Date: Mon, 20 May 2024 17:15:19 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: porten at kde dot 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115165 Bug ID: 115165 Summary: ICE on -ftime-report with module and c++2b 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: --- Purely by accident, I ran into an ICE when using -ftime-report on a file including a system header with a .gcm file of that header present. The scen= ario appeared after an attempt to improve compilation speed. timevar.cc line 490 performs gcc_assert (!tv->standalone). Note 1: A combination of #include with x.gcm present may be unsupported. Note 2: The error goes away when compiling with c++2a or c++20 rather than c++2b. $ cat main.cpp #include int main(int, char **) { std::cout; } $ g++ -fmodules-ts -std=3Dc++2b -x c++-system-header iostream $ g++ -ftime-report -fmodules-ts -std=3Dc++2b main.cpp main.cpp: In destructor =E2=80=98std::__codecvt_abstract_base<_InternT, _Ex= ternT, _StateT>::~__codecvt_abstract_base() [with _InternT =3D char16_t; _ExternT = =3D char; _StateT =3D __mbstate_t]=E2=80=99: main.cpp:2:31: internal compiler error: in start, at timevar.cc:490 2 | int main(int, char **) { std::cout; } | ^~~~ 0x74294d timer::start(timevar_id_t) /home/user/git/gcc/gcc/timevar.cc:490 0x74294d timer::start(timevar_id_t) /home/user/git/gcc/gcc/timevar.cc:481 0x74294d timevar_start(timevar_id_t) /home/user/git/gcc/gcc/timevar.cc:475 0x87b7ec lazy_load_pendings(tree_node*) /home/user/git/gcc/gcc/cp/module.cc:19470 0x881c48 maybe_lazily_declare /home/user/git/gcc/gcc/cp/name-lookup.cc:2002 0x881c48 get_class_binding(tree_node*, tree_node*, bool) /home/user/git/gcc/gcc/cp/name-lookup.cc:2038 0x9342fd lookup_field_r /home/user/git/gcc/gcc/cp/search.cc:1061 0x934c18 dfs_walk_all(tree_node*, tree_node* (*)(tree_node*, void*), tree_n= ode* (*)(tree_node*, void*), void*) /home/user/git/gcc/gcc/cp/search.cc:1507 0x934c18 lookup_member(tree_node*, tree_node*, int, bool, int, access_failure_info*) /home/user/git/gcc/gcc/cp/search.cc:1216 0x9350d0 lookup_fnfields(tree_node*, tree_node*, int, int) /home/user/git/gcc/gcc/cp/search.cc:1426 0x773277 build_op_delete_call(tree_code, tree_node*, tree_node*, bool, tree_node*, tree_node*, int) /home/user/git/gcc/gcc/cp/call.cc:7864 0x892372 build_delete_destructor_body /home/user/git/gcc/gcc/cp/optimize.cc:140 0x893738 maybe_clone_body(tree_node*) /home/user/git/gcc/gcc/cp/optimize.cc:610 0x85f01f post_load_processing /home/user/git/gcc/gcc/cp/module.cc:17758 0x877793 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_sl= ot*) /home/user/git/gcc/gcc/cp/module.cc:19424 0x889b64 name_lookup::search_namespace_only(tree_node*) /home/user/git/gcc/gcc/cp/name-lookup.cc:920 0x889ca4 name_lookup::search_namespace(tree_node*) /home/user/git/gcc/gcc/cp/name-lookup.cc:1006 0x889f8f name_lookup::search_namespace(tree_node*) /home/user/git/gcc/gcc/cp/name-lookup.cc:1001 0x889f8f name_lookup::search_qualified(tree_node*, bool) /home/user/git/gcc/gcc/cp/name-lookup.cc:1067 0x88d161 qualified_namespace_lookup /home/user/git/gcc/gcc/cp/name-lookup.cc:7278 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. GCC was built with today's state of the releases/gcc-14 branch.=20 $ g++ -v Using built-in specs. COLLECT_GCC=3Dg++ COLLECT_LTO_WRAPPER=3D/opt/gcc-14/libexec/gcc/x86_64-pc-linux-gnu/14.1.1/lt= o-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/porten/git/gcc/configure --disable-multilib --prefix=3D/opt/gcc-14 --enable-languages=3Dc,c++ : (reconfigured) /home/porten/git/gcc/configure --disable-multilib --prefix=3D/opt/gcc-14 --enable-languages=3Dc,c++ : (reconfigured) /home/porten/git/gcc/configure --disable-multilib --prefix=3D/opt/gcc-14 --enable-languages=3Dc,c++,lto --no-create --no-recursion Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.1.1 20240520 (GCC)=