http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55763
--- Comment #15 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-01-03 16:54:03 UTC --- (In reply to comment #14) > type(t), target :: x > class(*), pointer :: ptr2 => x TODO: Check whether that would be also valid if "x" is not SAVE (here it is as "x" is in the main program) and whether one should reject a pointer as data-target. (Cf. also PR51076, PR45290 and PR50410 comment 9.) (In reply to comment #14) > The following (currently used in gfortran.dg/unlimited_polymorphic_3.f03) is > invalid: > class(*), pointer :: ptr2 => null(x) Note that ptr => null(x) is valid. In any case same_type_as (ptr,x) will be .false. as "ptr" has the declared type (which doesn't exist) and "x" has a declared type. Presumably, even same_type_as(ptr,ptr) would be false?!?