This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
- From: "sfilippone at uniroma2 dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2010 12:20:18 -0000
- Subject: [Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
- References: <bug-43945-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #21 from sfilippone at uniroma2 dot it 2010-06-23 12:20 -------
(In reply to comment #20)
> (In reply to comment #14)
> > The attached variation of generic_23 still does not work.
>
> ... and the dump shows why:
>
>
>
> The specific PPCs of 'foo2' point to the right procedures, but their generic
> counterparts don't.
>
Same thing happens for the code of #19:
struct class$base_sparse_mat class.6;
if (vtab$d_coo_sparse_mat.allocate == 0B)
{
vtab$vtype$d_coo_sparse_mat$allocate.allocate_mnnz =
base_allocate_mnnz;
vtab$d_coo_sparse_mat.allocate = &vtab$vtype$d_coo_sparse_mat$allocate;
vtab$d_coo_sparse_mat.allocate_mnnz = (void (*<T5b>) (void))
d_coo_allocate_mnnz;
vtab$d_coo_sparse_mat.set_null = (void (*<T5b>) (void)) base_set_null;
vtab$d_coo_sparse_mat.get_fmt = (void (*<T5b>) (void)) d_coo_get_fmt;
}
class.6.$vptr = (struct vtype$base_sparse_mat *) &vtab$d_coo_sparse_mat;
class.6.$data = (struct base_sparse_mat *) &acoo;
base_allocate_mnnz (&n, &n, &class.6, &nnz);
^^^^^^^^^
Note the last statement should ultimately be resolved to
vtab$d_coo_sparse_mat.allocate_mnnz
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43945