http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56814
Bug #: 56814 Summary: [4.8/4.9 Regression] Bogus Interface mismatch in dummy procedure Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: ja...@gcc.gnu.org The following code compiles with ifort and gfortran 4.5 to 4.7. With 4.8 and 4.9 it fails with: Error: Interface mismatch in dummy procedure 'fun' at (1): PROCEDURE POINTER mismatch in function result However, to me the interfaces look the same. Reported at comp.lang.fortran by Macro Restelli, https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/rfoD-brnIqI module m1 abstract interface pure function i_f(x) result(d) real, intent(in) :: x(:,:) real :: d(size(x,1),size(x,2)) end function i_f end interface procedure(i_f), pointer :: f => null() end module m1 module m2 contains pure subroutine ns_dirdata(fun) interface pure function fun(x) result(d) real, intent(in) :: x(:,:) real :: d(size(x,1),size(x,2)) end function fun end interface end subroutine ns_dirdata end module m2 program p use m1 use m2 call ns_dirdata(f) end program p