https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84105
--- Comment #2 from Arnd Bergmann <arnd at linaro dot org> --- Created attachment 43281 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43281&action=edit preprocessed simplified sm_sideeffect.c, compressed I managed to get a standalone testcase now, manually reduced the original source and then preprocessed. Further automated reduction should be easy now if necessary. x86_64-linux-gcc-8.0.1 -c -m32 -o lto-test.o lto-test.i -O2 -flto -Wno-pointer-sign -fno-strict-aliasing x86_64-linux-gcc-8.0.1 -fdump-ipa-inline-details -m32 -r -o sctp.ko lto-test.o The part that goes wrong is apparently the '-fdump-ipa-inline-details'. /git/arm-soc/net/sctp/lto-test.c: In function 'sctp_do_sm': /git/arm-soc/net/sctp/lto-test.c:120:5: internal compiler error: Segmentation fault int sctp_do_sm(struct net *net, enum sctp_event event_type, ^ 0xa42b7f crash_signal /home/arnd/git/gcc/gcc/toplev.c:325 0xaf0659 pp_tree_identifier(pretty_printer*, tree_node*) /home/arnd/git/gcc/gcc/tree-pretty-print.c:4006 0xaf0966 dump_decl_name /home/arnd/git/gcc/gcc/tree-pretty-print.c:261 0xaf42ea dump_generic_node(pretty_printer*, tree_node*, int, unsigned long, bool) /home/arnd/git/gcc/gcc/tree-pretty-print.c:1826 0xaf769a print_declaration(pretty_printer*, tree_node*, int, unsigned long) /home/arnd/git/gcc/gcc/tree-pretty-print.c:3333 0xaf7997 print_generic_decl(_IO_FILE*, tree_node*, unsigned long) /home/arnd/git/gcc/gcc/tree-pretty-print.c:122 0xb4603a dump_scope_block /home/arnd/git/gcc/gcc/tree-ssa-live.c:647 0xb471b9 dump_scope_blocks(_IO_FILE*, unsigned long) /home/arnd/git/gcc/gcc/tree-ssa-live.c:678 0xb471b9 remove_unused_locals() /home/arnd/git/gcc/gcc/tree-ssa-live.c:870 0x97af44 execute_function_todo /home/arnd/git/gcc/gcc/passes.c:1972 0x97b8b9 execute_todo /home/arnd/git/gcc/gcc/passes.c:2048 0x97dac5 execute_one_ipa_transform_pass /home/arnd/git/gcc/gcc/passes.c:2245 0x97dac5 execute_all_ipa_transforms() /home/arnd/git/gcc/gcc/passes.c:2281 0x6d681c cgraph_node::expand() /home/arnd/git/gcc/gcc/cgraphunit.c:2132 0x6d7b38 expand_all_functions /home/arnd/git/gcc/gcc/cgraphunit.c:2275 0x6d7b38 symbol_table::compile() /home/arnd/git/gcc/gcc/cgraphunit.c:2624 0x656c51 lto_main() /home/arnd/git/gcc/gcc/lto/lto.c:3349 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. lto-wrapper: fatal error: /home/arnd/cross-gcc/bin/x86_64-linux-gcc-8.0.1 returned 1 exit status compilation terminated. /home/arnd/cross-gcc/lib/gcc/x86_64-linux/8.0.1/../../../../x86_64-linux/bin/ld: error: lto-wrapper failed