------- Additional Comments From steven at gcc dot gnu dot org 2005-07-21 00:55 ------- The code of the original reporter is in fact not valid. >From the Fortran 95 standard: Section 4.4.2: "Two data entities have the same type if they are declared with reference to the same derived-type definition." Not the case here. "...Data entities in different scoping units also have the same type if they are declared with reference to different derived-type definitions that have the same name (...)" Also not the case here. So the types of BAR and BAZ are not the same. Section 7.5.1.2: "An intrinsic assignment statement is an assignment statement where the shapes of variable and expr conform and where (...) [t]he types of variable and expr are of the same derived type and no defined assignment exists for objects of this type." In this the types of variable (BAZ) and expr (BAR) are not the same, and there is no defined assignment from T0 to T1. So the code is not legal Fortran. Now, whether we should support this anyway is a different matter...
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19362