http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58771
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> --- This one is going to drive me mad! It appears that the derived type is not being built as Steve reported in comment #1. If I force it to be built by using a type 't' variable, the ICE goes away. However, I have not found the offending point where it is not being built... if you see what I mean. A slightly more elaborate and legal testcase to illustrate this: module m type t integer g end type end function f() result(ff) use m type(t) :: ff ff%g = 1 end use m type(t) :: z interface function f() result(ff) use m type(t) :: ff end function end interface print *,f() ! z = t(1) ! Does not ICE if this is uncommented end Paul