From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3311E3861829; Fri, 1 Dec 2023 21:07:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3311E3861829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701464855; bh=gF07EkCaZ1M/lqbA0KfDUizH431kX0P1Y5t16U5k0S4=; h=From:To:Subject:Date:From; b=Uwo84YafT46uCYIx9xGlld4DbD11/3bN2HZByx6DLnvXY2PQcZf3mODqkB0/9qIpt icO+8RnXPddDGEloBlrFTKRJdp0B/ZzeTBGor1ON8H53edslSEclGkJ6nM+TITW6/7 POQh5g0/WDoMCHskVSVlOmjox/G7bsnBurtv2dPs= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak Date: Fri, 01 Dec 2023 21:07:34 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz 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 keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112815 Bug ID: 112815 Summary: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 56759 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56759&action=3Dedit reduced testcase This crashes at the same place as PR107990, but with a different backtrace.= It has common -fno-weak flag. The original testcase didn't output the warning: 'T::T()::U::U()' used but never defined Compiler output: $ x86_64-pc-linux-gnu-gcc -flto -fno-weak testcase.C testcase.C:7:7: warning: 'T::T()::U::U()' used but never defined 7 | U (); | ^ during IPA pass: *free_lang_data testcase.C:5:12: internal compiler error: in vague_linkage_p, at cp/decl2.cc:2329 5 | struct U | ^ 0x74d356 vague_linkage_p(tree_node*) /repo/gcc-trunk/gcc/cp/decl2.cc:2329 0x11394bf no_linkage_check(tree_node*, bool) /repo/gcc-trunk/gcc/cp/tree.cc:3022 0xfd1cf3 mangle_decl(tree_node*) /repo/gcc-trunk/gcc/cp/mangle.cc:4146 0x1ad0a8d decl_assembler_name(tree_node*) /repo/gcc-trunk/gcc/tree.cc:719 0x1af7747 assign_assembler_name_if_needed(tree_node*) /repo/gcc-trunk/gcc/tree.cc:834 0x2916760 free_lang_data_in_cgraph /repo/gcc-trunk/gcc/ipa-free-lang-data.cc:1064 0x2916760 free_lang_data /repo/gcc-trunk/gcc/ipa-free-lang-data.cc:1109 0x2916760 execute /repo/gcc-trunk/gcc/ipa-free-lang-data.cc:1176 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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= cc COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-r14-6051-20231201105652-= gb1fe98dee21-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc= /x86_64-pc-linux-gnu/14.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-pc-linux-gnu --with-ld=3D/usr/bin/x86_64-pc-linux-gnu-ld --with-as=3D/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-r14-6051-20231201105652-gb1fe98dee= 21-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231201 (experimental) (GCC)=