[Bug fortran/51081] Proc-pointer assignment: Rejects valid internal proc, -std=f2008 should mention "F2008"
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 10 14:57:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51081
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Summary|-std=f2003: Internal |Proc-pointer assignment:
|procedure in proc-pointer |Rejects valid internal
|assignment: Mention that it |proc, -std=f2008 should
|is valid in F2008 |mention "F2008"
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-10 14:42:43 UTC ---
First, my example was incomplete. Secondly, I just realized that gfortran
rejects the program although I think it is valid (ifort also compiles it):
subroutine int2()
1
Error: FUNCTION attribute conflicts with SUBROUTINE attribute in 'int2' at (1)
I do not see why gfortran regards "int2" as function. If one uncomments the
call line, one even gets:
Error: Interface mismatch in procedure pointer assignment at (1): 'int2' is not
a subroutine
procedure(), pointer :: ptr
ptr => int2
! call ptr()
contains
subroutine int2()
end subroutine int2
end
More information about the Gcc-bugs
mailing list