public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "alex.miller at gmx dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) Date: Sat, 10 Apr 2021 01:36:42 +0000 [thread overview] Message-ID: <bug-100010-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010 Bug ID: 100010 Summary: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: alex.miller at gmx dot de CC: marxin at gcc dot gnu.org Target Milestone: --- Building lcdf-typetools-2.108 fails with an ICE while linking the mmafm tool (with gcc-10 using the flags "-O3 -flto -fdevirtualize-at-ltrans"). Here's a reduced sample that reproduces the issue (even with -O2): --- struct String { String(char); ~String(); }; struct ErrorHandler { virtual String decorate(const String &); }; String ErrorHandler::decorate(const String &str) { decorate(str); return 0; } struct LandmarkErrorHandler : ErrorHandler { String _landmark; LandmarkErrorHandler(); String decorate(const String &); }; String LandmarkErrorHandler::decorate(const String &) { return ErrorHandler::decorate(0); } struct Charstring { virtual ~Charstring(); virtual void process() = 0; } *interpret_cs; Charstring::~Charstring() {} struct : Charstring { void process() {} } _cdv; int main() { LandmarkErrorHandler(); interpret_cs->process(); } --- $ g++ -O2 -flto -fdevirtualize-at-ltrans a.cc during IPA pass: static-var lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:447 Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. lto-wrapper: fatal error: g++ returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Reducing the sources seems a bit brittle, like often with LTO: * Combining all sources in a single file changed the error message to "lto1: internal compiler error: Segmentation fault", but minimizing made the error location reappear. The result is very similar to a multi-file reduction. * Reduced sample fails with -O2, full sources need -O3. * With g++-9.3.0 the reduced sample doesn't trigger the ICE, but the original sources do (at lto-cgraph.c:453). Let me know if you need another sample.
next reply other threads:[~2021-04-10 1:36 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-10 1:36 alex.miller at gmx dot de [this message] 2021-04-11 18:56 ` [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719 marxin at gcc dot gnu.org 2021-04-12 8:14 ` rguenth at gcc dot gnu.org 2021-04-12 9:58 ` hubicka at gcc dot gnu.org 2021-05-14 9:54 ` [Bug lto/100010] [9/10/11/12 " jakub at gcc dot gnu.org 2021-06-01 8:20 ` rguenth at gcc dot gnu.org 2022-02-11 7:07 ` xry111 at mengyan1223 dot wang 2022-05-27 9:44 ` [Bug lto/100010] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:44 ` jakub at gcc dot gnu.org 2022-08-16 8:03 ` yinyuefengyi at gmail dot com 2023-07-07 10:39 ` [Bug lto/100010] [11/12/13/14 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100010-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).