https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114888
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Though, I think both build_pointer_type and build_reference_type would segfault if it was called on NULL_TREE to_type, and I don't see any spot in the FE that would create pointer/reference types without those routines. SO I think just && type1 should be right.