public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sfilippone at uniroma2 dot it" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
Date: Tue, 06 Jul 2010 10:14:00 -0000	[thread overview]
Message-ID: <20100706101426.1033.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43945-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #24 from sfilippone at uniroma2 dot it  2010-07-06 10:14 -------
(In reply to comment #23)
> (In reply to comment #22)
> > 
> generic_23.f03 obviously works becase the binding name DOIT and the procedure
> name are one and the same.... 
> 
Hi all
Another variation to the test case, to have the guilty statements in a one-line
function of their own, and the -fdump-tree-original shows what's going on:
tryset is correct, tryall has this  "a->$vptr->allocate->allocate_mnnz "  
thing which leads to error. If it was just "a->$vptr->allocate_mnnz " (which I
tested by changing the statement to invoke directly the specific binding name)
it would work. 
So, it looks like the code that resolves the generic procedure would do well to
just avoid the GENERIC part of the vtab, resolve the generic to a specific and
invoke the vtab for the specific. I have tried to follow the resolve code, but
I got lost (I guess it's a bit coplex as a first trip inside gfortran guts :-) 
I suppose the originator(s) of the code would do much better. 

tryall (struct class$d_base_sparse_mat & restrict a, integer(kind=4) & restrict
m, integer(kind=4) & restrict n, integer(kind=4) & restrict nz)
{
  a->$vptr->allocate->allocate_mnnz ((integer(kind=4) *) m, (integer(kind=4) *)
n, (struct class$d_base_sparse_mat *) a, (integer(kind=4) *) nz);
}


tryset (struct class$d_base_sparse_mat & restrict a)
{
  a->$vptr->set_null ((struct class$d_base_sparse_mat *) a);
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43945


  parent reply	other threads:[~2010-07-06 10:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-30  9:25 [Bug fortran/43945] New: " burnus at gcc dot gnu dot org
2010-04-30  9:25 ` [Bug fortran/43945] " sfilippone at uniroma2 dot it
2010-04-30  9:36 ` burnus at gcc dot gnu dot org
2010-04-30  9:42 ` sfilippone at uniroma2 dot it
2010-04-30  9:43 ` sfilippone at uniroma2 dot it
2010-04-30  9:43 ` sfilippone at uniroma2 dot it
2010-04-30 14:33 ` pault at gcc dot gnu dot org
2010-05-01 17:17 ` pault at gcc dot gnu dot org
2010-05-05 21:05 ` pault at gcc dot gnu dot org
2010-06-06  2:04 ` janus at gcc dot gnu dot org
2010-06-06  2:29 ` janus at gcc dot gnu dot org
2010-06-06  2:49 ` janus at gcc dot gnu dot org
2010-06-06  3:03 ` janus at gcc dot gnu dot org
2010-06-06 16:21 ` janus at gcc dot gnu dot org
2010-06-07  8:26 ` sfilippone at uniroma2 dot it
2010-06-07  8:27 ` sfilippone at uniroma2 dot it
2010-06-07  9:41 ` burnus at gcc dot gnu dot org
2010-06-08 14:09 ` sfilippone at uniroma2 dot it
2010-06-16 10:32 ` sfilippone at uniroma2 dot it
2010-06-16 10:32 ` sfilippone at uniroma2 dot it
2010-06-21 11:01 ` janus at gcc dot gnu dot org
2010-06-23 12:20 ` sfilippone at uniroma2 dot it
2010-06-25 15:32 ` sfilippone at uniroma2 dot it
2010-06-25 15:35 ` sfilippone at uniroma2 dot it
2010-07-06 10:14 ` sfilippone at uniroma2 dot it [this message]
2010-07-06 10:15 ` sfilippone at uniroma2 dot it
2010-07-07 13:15 ` sfilippone at uniroma2 dot it
2010-07-07 14:25 ` sfilippone at uniroma2 dot it
2010-07-11  9:40 ` janus at gcc dot gnu dot org
2010-07-13  8:54 ` burnus at gcc dot gnu dot org
2010-07-13  9:07 ` sfilippone at uniroma2 dot it
2010-07-13  9:12 ` burnus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100706101426.1033.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).