This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56814] New: [4.8/4.9 Regression] Bogus Interface mismatch in dummy procedure
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Apr 2013 15:52:52 +0000
- Subject: [Bug fortran/56814] New: [4.8/4.9 Regression] Bogus Interface mismatch in dummy procedure
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: janus@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