public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/96291] New: -flto fails as "internal compiler error: Segmentation fault" during IPA pass: cp incall_for_symbol_thunks_and_aliases()
@ 2020-07-22 22:41 slyfox at inbox dot ru
  2020-07-23  6:00 ` [Bug ipa/96291] [10/11 Regression] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: slyfox at inbox dot ru @ 2020-07-22 22:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96291

            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 where
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
       
/usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/toplev.c:328
0x7f1656e35c3f ???
       
/usr/src/debug/sys-libs/glibc-2.31-r6/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x5d4751 has_undead_caller_from_outside_scc_p
       
/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_node*,
void*), void*, bool, bool)
       
/usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/cgraph.c:2450
0x12fe86d identify_dead_nodes
       
/usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c:5687
0x12fe86d ipcp_decision_stage
       
/usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c:5730
0x12fe86d ipcp_driver
       
/usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/ipa-cp.c:5908
0x12fe86d execute
       
/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 <https://bugs.gentoo.org/> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-08-12 17:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 22:41 [Bug lto/96291] New: -flto fails as "internal compiler error: Segmentation fault" during IPA pass: cp incall_for_symbol_thunks_and_aliases() slyfox at inbox dot ru
2020-07-23  6:00 ` [Bug ipa/96291] [10/11 Regression] " rguenth at gcc dot gnu.org
2020-07-23  9:08 ` marxin at gcc dot gnu.org
2020-07-23 10:10 ` jamborm at gcc dot gnu.org
2020-07-24 12:25 ` romain.geissler at amadeus dot com
2020-07-24 18:08 ` slyfox at inbox dot ru
2020-07-25 11:54 ` slyfox at inbox dot ru
2020-07-25 14:09 ` slyfox at inbox dot ru
2020-07-25 18:37 ` slyfox at inbox dot ru
2020-07-27 12:43 ` jamborm at gcc dot gnu.org
2020-07-28 22:31 ` cvs-commit at gcc dot gnu.org
2020-08-12 17:11 ` [Bug ipa/96291] [10 Regression] -flto fails as ICE " marxin at gcc dot gnu.org
2020-08-12 17:40 ` cvs-commit at gcc dot gnu.org
2020-08-12 17:43 ` marxin at gcc dot gnu.org

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).