This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56261] [OOP] seg fault call procedure pointer on polymorphic array
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 09 Feb 2013 10:03:06 +0000
- Subject: [Bug fortran/56261] [OOP] seg fault call procedure pointer on polymorphic array
- Auto-submitted: auto-generated
- References: <bug-56261-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56261
--- Comment #3 from janus at gcc dot gnu.org 2013-02-09 10:03:06 UTC ---
Fortunately there is a simple workaround: Declaring the procedure pointer as
procedure(ff), pointer :: f => ff
makes the segfault go away. The call is then done in the same way as the direct
call to 'ff':
{
struct __class_t_Nc_1_0 class.2;
class.2._data = VIEW_CONVERT_EXPR<struct array1_nc>(c._data);
class.2._vptr = c._vptr;
f (&class.2);
}