This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39946] New: PROCEDURE statements: interface with RESULT variable
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Apr 2009 14:39:44 -0000
- Subject: [Bug fortran/39946] New: PROCEDURE statements: interface with RESULT variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program
procedure(prc_is_allowed), pointer :: fptr
interface
function prc_is_allowed (flv, hel, col) result (is_allowed)
logical :: is_allowed
integer, intent(in) :: flv, hel, col
end function prc_is_allowed
end interface
fptr => prc_is_allowed
end
currently fails with
fptr => prc_is_allowed
1
Error: Interfaces don't match in procedure pointer assignment at (1)
which is nonsense, of course. This seems to be due to a bug in the
implementation of PROCEDURE statements and was only discovered after PR39735
was fixed (checking of return values in procedure pointer assignments). The
test case was provided by Juergen Reuter.
--
Summary: PROCEDURE statements: interface with RESULT variable
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39946