https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81940
--- Comment #1 from Dmitry G. Dyachenko <dimhen at gmail dot com> --- $ g++ -fpreprocessed -Werror -Wall -Wextra -flto -O -std=c++98 x.ii -fpic -DPIC -c -o x.o && g++ -shared x.o -g -flto -o x.so during IPA pass: inline /home/dimhen/src/CSPbuild/ipsec/esp/esp_init.cpp: In function ‘cpesp_init_gost’: /home/dimhen/src/CSPbuild/ipsec/esp/esp_init.cpp:341:10: internal compiler error: in dwarf2out_abstract_function, at dwarf2out.c:21871 espIn(h, in); ^ 0xac1312 dwarf2out_abstract_function /home/dimhen/src/gcc_current/gcc/dwarf2out.c:21871 0x6ebba6 expand_call_inline /home/dimhen/src/gcc_current/gcc/tree-inline.c:4924 0x6eccb7 gimple_expand_calls_inline /home/dimhen/src/gcc_current/gcc/tree-inline.c:4954 0x6eccb7 optimize_inline_calls(tree_node*) /home/dimhen/src/gcc_current/gcc/tree-inline.c:5094 0x15ab13c inline_transform(cgraph_node*) /home/dimhen/src/gcc_current/gcc/ipa-inline-transform.c:705 0x67c9ee execute_one_ipa_transform_pass /home/dimhen/src/gcc_current/gcc/passes.c:2237 0x67c9ee execute_all_ipa_transforms() /home/dimhen/src/gcc_current/gcc/passes.c:2279 0xa69a4f cgraph_node::expand() /home/dimhen/src/gcc_current/gcc/cgraphunit.c:2047 0xa6ab80 expand_all_functions /home/dimhen/src/gcc_current/gcc/cgraphunit.c:2190 0xa6ab80 symbol_table::compile() /home/dimhen/src/gcc_current/gcc/cgraphunit.c:2542 0x9daf14 lto_main() /home/dimhen/src/gcc_current/gcc/lto/lto.c:3340 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: g++ returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status