https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61421
--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to mimamer from comment #16) > Ah ok, but that doesn't solve my problem as I will eventually need to cast a > node pointer back to T (either at the caller or the callee side). So there > _is_ no efficient solution with strict aliasing rules. Which makes it kinda > broken, IMO. No that cast works iff the original type of the variable was T and in your case the only time it was not T is when it is anchor so it should just work correctly.