https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93369
--- Comment #19 from Jan Hubicka <hubicka at gcc dot gnu.org> --- The reason why we get link failure is that we behave differently to mismatched comdats. While linker choose comdat that wins and eliminate other one we keep the other symbol and end up compiling it which leads to interesting issues with "half comdat" I am aiming to solve with the patch for proper handling of aliases. I think updating the testcase with -shared is a way to go for this P1 and I we can discuss the alias issue (probably for 10.2, since it is bit involved and very old) Honza