https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86651
--- Comment #6 from jwjagersma at gmail dot com --- (In reply to Richard Biener from comment #5) After building a more complex program with the above patch (applied to gcc 8.1.0 release sources), this ICE appears during linking: lto1.exe: internal compiler error: in gen_subprogram_die, at dwarf2out.c:22668 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. lto-wrapper.exe: fatal error: D:\msys64\usr\local\cross\bin\i586-pc-msdosdjgpp-g++.exe returned 1 exit status compilation terminated. collect2.exe: fatal error: lto-wrapper returned 1 exit status compilation terminated. Being entirely unfamiliar with gcc internals, I'm not sure what went wrong here.