------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-31 02:04 ------- This does not look like valid code. As the types of the dummy z are different. The error message is bogus but that is a different bug. PR 20067.
Arrays have nothing to do with it by the way, you can reproduce the error with: module foo public bar_ interface bar_ module procedure bar end interface public xxx_ interface xxx_ module procedure xxx end interface contains subroutine xxx(self,z) interface function self(z) result(res) integer :: z real :: res end function end interface call bar_(self) end subroutine subroutine bar(self) interface function self(z) result(res) real :: z real :: res end function end interface end subroutine end And it is obvious from there that bar_ cannot be called from xxx. (Intel's fortran compiler accepts this too which I find weird as this is obvious broken code). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26041