From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87AF43858D38; Wed, 22 Jul 2020 22:41:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87AF43858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595457679; bh=z65F9FBwpwOIm62+yn4MlK0HL9zNrw4Is++2g7OExCo=; h=From:To:Subject:Date:From; b=cOX42QadB39zdqExNp+lnT5NbpUEwnWM0l39nHAjXQd/A/LK4RNp2m2pA8pUijrBy QH5qkmH8R4oyN6IfyvXur1zIoGZZXPYypgMaryfZL+qawClywL2oPPq+Q/ymk9JhHA LgMpW6rJc+5m5MThrbfq6fltfwvvjz6WvBTnjoqI= From: "slyfox at inbox dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/96291] New: -flto fails as "internal compiler error: Segmentation fault" during IPA pass: cp incall_for_symbol_thunks_and_aliases() Date: Wed, 22 Jul 2020 22:41:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at inbox dot ru 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 cc 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 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: Wed, 22 Jul 2020 22:41:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96291 Bug ID: 96291 Summary: -flto fails as "internal compiler error: Segmentation fault" during IPA pass: cp incall_for_symbol_thunks_and_aliases() Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at inbox dot ru CC: marxin at gcc dot gnu.org Target Milestone: --- Originally reported by Gabriel Marcano as https://bugs.gentoo.org/733482 wh= ere radare-4.5.0 ICEs gcc if that is built with -flto. ICE is reproducible on both gcc-10 and gcc-11. Here is the minimal(ish) reproducer: // cat sdb.c int b; void a(); void sdb_ns_free(); void c(int d) { sdb_ns_free(); a(b, 0); } void sdb_free() { c(0); } // cat ns.c void sdb_free(); void sdb_ns_free() { sdb_free(); } // cat main.c void sdb_free(); void a() { sdb_free(); } $ x86_64-pc-linux-gnu-gcc -c -O2 -flto -o sdb.o sdb.c $ x86_64-pc-linux-gnu-gcc -c -O2 -flto -o ns.o ns.c $ x86_64-pc-linux-gnu-gcc -c -O2 -flto -O0 -o main.o main.c $+ x86_64-pc-linux-gnu-gcc -O2 -flto -o sdb main.o sdb.o ns.o during IPA pass: cp lto1: internal compiler error: Segmentation fault 0xa6d3df crash_signal =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/toplev.c= :328 0x7f1656e35c3f ??? =20=20=20=20=20=20=20 /usr/src/debug/sys-libs/glibc-2.31-r6/glibc-2.31/signal/../sysdeps/unix/sys= v/linux/x86_64/sigaction.c:0 0x5d4751 has_undead_caller_from_outside_scc_p =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c= :5670 0x680054 cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_no= de*, void*), void*, bool, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/cgraph.c= :2450 0x12fe86d identify_dead_nodes =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c= :5687 0x12fe86d ipcp_decision_stage =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c= :5730 0x12fe86d ipcp_driver =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c= :5908 0x12fe86d execute =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c= :5999 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-gcc returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin= /ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status=