[Bug fortran/57710] [OOP] [F08] _vptr not set for allocatable CLASS component inside BLOCK
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 31 19:15:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57710
--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to janus from comment #2)
> Can't we do a 'static' initialization (of _vptr *and* _data) in both cases?
> As in
>
> struct t2 y = {.x={._vptr=&__vtab_m_T,._data = 0B}}
>
> For this gfc_class_null_initializer (from class.c) could be used ...
... we would just have to enable this for the BLOCK case in gfc_get_symbol
decl. However, I'm not sure if this is really the way to go.
Otherwise, one should do the (non-static) initialization of the _vptr via
gfc_nullify_alloc_comp.
More information about the Gcc-bugs
mailing list