https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92242
--- Comment #2 from Dmitry G. Dyachenko <dimhen at gmail dot com> --- correctly reduced testcase $ cat x.i unsigned foo(int a) { if (a) return 0; return 1; } $ cat y.i unsigned foo(int); int bar() { foo(0); return 0; } $ cat libso.ver { global: bar; local: *; }; $ gcc -O2 -flto -Wall -c x.i y.i $ gcc -flto -fPIC -DPIC -shared x.o y.o -Wl,-version-script -Wl,./libso.ver -o libso.so during IPA pass: inline lto1: internal compiler error: Segmentation fault 0xdd4bdf crash_signal /home/dimhen/src/gcc_current/gcc/toplev.c:326 0x64e28d ipa_get_cs_argument_count /home/dimhen/src/gcc_current/gcc/ipa-prop.h:598 0x64e28d ipa_merge_fn_summary_after_inlining(cgraph_edge*) /home/dimhen/src/gcc_current/gcc/ipa-fnsummary.c:3318 0x16f66db inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*, int*, bool, bool*) /home/dimhen/src/gcc_current/gcc/ipa-inline-transform.c:484 0x16f0682 inline_small_functions /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2151 0x16f0682 ipa_inline /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2615 0x16f0682 execute /home/dimhen/src/gcc_current/gcc/ipa-inline.c:3023 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ gcc -flto -fPIC -DPIC -shared x.o y.o -Wl,-version-script -Wl,./libso.ver -o libso.so during IPA pass: inline lto1: internal compiler error: Segmentation fault 0xdd4bdf crash_signal /home/dimhen/src/gcc_current/gcc/toplev.c:326 0x64e28d ipa_get_cs_argument_count /home/dimhen/src/gcc_current/gcc/ipa-prop.h:598 0x64e28d ipa_merge_fn_summary_after_inlining(cgraph_edge*) /home/dimhen/src/gcc_current/gcc/ipa-fnsummary.c:3318 0x16f66db inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*, int*, bool, bool*) /home/dimhen/src/gcc_current/gcc/ipa-inline-transform.c:484 0x16f0682 inline_small_functions /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2151 0x16f0682 ipa_inline /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2615 0x16f0682 execute /home/dimhen/src/gcc_current/gcc/ipa-inline.c:3023 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.