https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81237
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, you are compiling the files with different levels of ABI. -fabi-version=6 is specified in test.o but not test2.o . Can you try with the same abi version and try again?