https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91258
--- Comment #6 from seurer at gcc dot gnu.org --- Digging in to the details of the compilation a bit the error occurs when collect2 calls ld as part of lto. There is a lot of differences in the assembler output in the lto stuff before/after r273783. Perhaps you can figure out something from that (diff attached). ++ /usr/bin/ld -v -plugin /home/seurer/gcc/build/gcc-test2/gcc/testsuite/g++/../../liblto_plugin.so -plugin-opt=/home/seurer/gcc/build/gcc-test2/gcc/testsuite/g++/../../lto-wrapper -plugin-opt=-fresolution=/tmp/cc96yrZX.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --eh-frame-hdr -V -m elf64ppc -dynamic-linker /lib64/ld64.so.1 -o ./vla-1.exe /lib/../lib64/crt1.o /lib/../lib64/crti.o /home/seurer/gcc/build/gcc-test2/gcc/testsuite/g++/../../crtbegin.o -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libsanitizer/ubsan/.libs -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libstdc++-v3/src/.libs -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libstdc++-v3/src/.libs -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libitm/.libs -L/home/seurer/gcc/build/gcc-test2/gcc/testsuite/g++/../.. -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libsanitizer -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libsanitizer/ubsan -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libstdc++-v3/src/.libs -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libitm -L/lib/../lib64 -L/usr/lib/../lib64 /tmp/cc47HC2I.o -lstdc++ -lm -lubsan -lgcc_s -lgcc -lc -lgcc_s -lgcc /home/seurer/gcc/build/gcc-test2/gcc/testsuite/g++/../../crtend.o /lib/../lib64/crtn.o GNU ld version 2.27-34.base.el7 GNU ld version 2.27-34.base.el7 Supported emulations: elf64ppc elf32ppc elf32ppclinux elf32ppcsim elf32_spu In function 'f', inlined from 'main' at /home/seurer/gcc/gcc-test2/gcc/testsuite/g++.dg/ubsan/vla-1.C:11:4: /home/seurer/gcc/gcc-test2/gcc/testsuite/g++.dg/ubsan/vla-1.C:6:24: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=] I tried a couple different versions of binutils/ld and they all generate the same error. Looking through the verbose output of ld I see nothing useful.