http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53537
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> 2013-01-09 13:54:15 UTC --- Created attachment 29124 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29124 "Fix" for the regression in comment #3 For the remaining problem: (In reply to comment #3) > The patch of comment 1 fails for testsuite/gfortran.dg/import7.f90: > > TYPE(T3) X > 1 > Error: The type of 'x' at (1) has not been declared within the interface maybe we can just remove the error. After all, there is already non-interface-specific code to diagnose uses of undeclared types. For that code to trigger in place of the error above, a few adjustments are needed to avoid searching the type outside the interface (so that the type is really not found). With the attached patch, comment #0, comment #1 and comment #4 are accepted, but a few adjustments are needed in the testsuite: from: type(fcnparms) :: fparams ! { dg-error "not been declared within the in 1 Error: The type of 'fparams' at (1) has not been declared within the interface to: type(fcnparms) :: fparams ! { dg-error "not been declared within the in 1 Error: Derived type 'fcnparms' at (1) is being used before it is defined I will test the patch against the full testsuite. As it touches the core of the symbol resolution, it's quite to be expected that it has "interesting" side effects.