This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39850] New: Too strict checking for procedures as actual argument
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Apr 2009 14:56:20 -0000
- Subject: [Bug fortran/39850] New: Too strict checking for procedures as actual argument
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Issue came up when testing/rewiewing proc pointers, cf.
http://gcc.gnu.org/ml/fortran/2009-04/msg00214.html
The following program is believed to be correct and it runs with g95, NAG f95,
sunf95, openf95, and ifort, but not with gfortran:
Error: Type/rank mismatch in argument 'a'
real function func()
func = 42.0
end function func
program test
external func ! subroutine or implicitly typed real function
call sub(func) ! Error: Type/rank mismatch in argument 'a'
contains
subroutine sub(a)
real, external :: a
print *, a(0.4)
end subroutine sub
end
--
Summary: Too strict checking for procedures as actual argument
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39850