https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85238
--- Comment #21 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > Looks good to me, aka OK if it passes whatever testing you think is > sufficient. Thanks. There is apparently another, preexisting issue visible in Ada: $ gcc -o t t.c -flto -g lto-wrapper.exe: fatal error: simple_object_copy_lto_debug_sections not implemented: Invalid argument $ gnatmake nested_controlled_alloc -flto gcc -c -flto nested_controlled_alloc.adb gnatbind -x nested_controlled_alloc.ali gnatlink nested_controlled_alloc.ali -flto lto-wrapper.exe: fatal error: file too short: No error compilation terminated. c:/home/botcazou/anod-wave/x86_64-windows/gcc-gcc-head.0/install/bin/../libexec/gcc/x86_64-pc-mingw32/8.0.1/ld.exe: error: lto-wrapper failed but adding -g0 makes it disappear: $ gnatmake nested_controlled_alloc -flto -g0 gcc -c -flto -g0 nested_controlled_alloc.adb gnatbind -x nested_controlled_alloc.ali gnatlink nested_controlled_alloc.ali -flto -g0 Do you have any idea about what's going on here?