https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65982
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> --- On mainline this is now fixed by the transparent aliases patchset. On release branches I suggest going with the patch from Comment 4. I am moving back to Prague right now, Markus, if you can put the testcase into the testuiste it would be great. Any extra coverage of weakref is cool