https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86651
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 25 Jul 2018, jwjagersma at gmail dot com wrote: > 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. There are latent bugs that now affect darwin, mingw and djgpp (after your patch) by default when compiling with -g0 and linking with -g (which is basically what those patches enforce). Some of them have been fixed on the GCC 8 branch already so I suggest you use the GCC 8.2 release candidate tarball to see if it works there. (ftp://gcc.gnu.org/pub/gcc/snapshots/8.2.0-RC-20180719/)