[Bug fortran/56261] [OOP] seg fault call procedure pointer on polymorphic array
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 8 08:11:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56261
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #13 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-08 08:11:44 UTC ---
(See also thread ending with
http://gcc.gnu.org/ml/fortran/2013-04/msg00048.html)
Regarding comment 1, using
procedure( ), pointer :: f => ff
as well as something like
external :: ggg
procedure(ff), pointer :: f => ggg
is invalid as "ff" has a class dummy argument, which mandates an explicit
interface (F2008, 12.4.2.2, (2)(a); cf. comment 6) and Fortran 2008 demands:
"If the characteristics of the pointer object or the pointer target are such
that an explicit interface is required, both the pointer object and the pointer
target shall have an explicit interface." (para 4 of "7.2.2.4 Procedure pointer
assignment")
[Those aren't constraints, hence, the compiler is not required to diagnose it -
nor can it do so in general. However, if the explicit interface of "ff" is
available, as comment 1, it can. Thus, a diagnostic would be nice.]
More information about the Gcc-bugs
mailing list