http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47601
--- Comment #13 from janus at gcc dot gnu.org 2011-05-26 21:25:30 UTC --- Here is a reduced version of comment #11: module type_definitions implicit none type :: matching integer :: n = -999 end type type, extends(matching) :: ellipse end type end module type_definitions module elliptical_elements implicit none contains function line(e) result(a2n) use type_definitions type(ellipse), intent(in) :: e complex, dimension(e%N) :: a2n ! <- change "e%N" to "10" end function line end module use type_definitions use elliptical_elements end Fails for me on x86_64-unknown-linux-gnu with 4.5, 4.6 and 4.7. Apparently related to type extension.