From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13BEE3858299; Sun, 31 Jul 2022 07:36:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13BEE3858299 From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/106334] [13 Regression] lto -g ICE in dwarf2out_register_external_die at dwarf2out.cc:6072 Date: Sun, 31 Jul 2022 07:36:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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 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: Sun, 31 Jul 2022 07:36:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106334 Sergei Trofimovich changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Resolution|FIXED |--- --- Comment #5 from Sergei Trofimovich --- I'll reopen this bug. I still see the crash in original example. I can make #comment1 example crash by using `-flto-partition=3Dnone` in the link phase: $ ./result/bin/g++ -O1 -flto -fPIC -g -I. -o eval-cache.o -c eval-cache.cc = && ./result/bin/g++ -O1 -flto -fPIC -g -I. -o eval.o -c eval.cc && ./result/bin/g++ -O1 -flto -fPIC -g -I. -o libnixexpr.so -shared eval-cache= .o eval.o -flto-partition=3Dnone lto1: internal compiler error: in dwarf2out_register_external_die, at dwarf2out.cc:6076 0x1dc6714 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, = char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x1dc7366 internal_error(char const*, ...) ???:0 0x8b7012 fancy_abort(char const*, int, char const*) ???:0 0xa07036 dwarf2out_register_external_die(tree_node*, char const*, unsigned long) ???:0 0x904efd lto_read_decls(lto_file_decl_data*, void const*, vec) ???:0 0x905c6a read_cgraph_and_symbols(unsigned int, char const**) ???:0 0x8edc52 lto_main() ???:0 The compiler should already cpntain the fix: $ ./result/bin/g++ -v | unnix Using built-in specs. COLLECT_GCC=3D/nix/store/w9kh67lghm1mq5gbcgg06d00d982cyj2-gcc-13.0.0/bin/g++ COLLECT_LTO_WRAPPER=3D/nix/store/w9kh67lghm1mq5gbcgg06d00d982cyj2-gcc-13.0.= 0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220724 (experimental) (GCC)=