public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47601] [OOP] Internal Error: mio_component_ref(): Component not found
Date: Sat, 28 May 2011 12:49:00 -0000	[thread overview]
Message-ID: <bug-47601-4-EqpzbnK9za@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47601-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #16 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-28 12:32:11 UTC ---
(In reply to comment #13)
>   type :: matching 
>      integer :: N = -999
>   end type
>   type, extends(matching) :: ellipse
>   end type

>     type(ellipse), intent(in) :: e
>     complex, dimension(e%N) :: a2n

Thus, when loading the expression, one needs to resolve e%N. One thus calls
module.c's mio_component_ref which does (on reading the .mod):

      if (sym->components != NULL && p->u.pointer == NULL)
        {
          /* Symbol already loaded, so search by name.  */
          for (q = sym->components; q; q = q->next)
            if (strcmp (q->name, name) == 0)
              break;

The comparison by name fails for extended types:

(gdb) p sym->components->name
$11 = 0x2aaaacec33b0 "matching"
(gdb) p sym->components->next
$12 = (struct gfc_component *) 0x0

Thus: Not found. However, one has:

(gdb) p sym->attr.extension 
$13 = 1
(gdb) p sym->components->ts.u.derived->name
$14 = 0x2aaaacec33b0 "matching"
(gdb) p sym->components->ts.u.derived->components->name
$15 = 0x2aaaacde3fa8 "n"

Janus, you know type extension better than me. Does one now needs to do:
  if (!p && sym->attr.extension)
    {
      p = search (sym->components->ts.u.derived)
      if (!p && sym->components->ts.u.derived->attr.extension)
        p = search (sym->components->ts.u.derived->...)

or is this the wrong method?


  parent reply	other threads:[~2011-05-28 12:33 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 18:40 [Bug fortran/47601] New: Internal Error (mio_component_ref(): Component not found) with strange behavior townsend at astro dot wisc.edu
2011-02-03 18:45 ` [Bug fortran/47601] " townsend at astro dot wisc.edu
2011-02-03 18:59 ` mikael at gcc dot gnu.org
2011-02-03 19:20 ` townsend at astro dot wisc.edu
2011-02-03 19:31 ` mikael at gcc dot gnu.org
2011-02-03 21:17 ` townsend at astro dot wisc.edu
2011-02-03 21:54 ` mikael at gcc dot gnu.org
2011-02-03 22:13 ` dominiq at lps dot ens.fr
2011-02-03 23:13 ` [Bug fortran/47601] Internal Error: mio_component_ref(): Component not found janus at gcc dot gnu.org
2011-03-29 19:51 ` [Bug fortran/47601] [OOP] " janus at gcc dot gnu.org
2011-04-04 12:56 ` mikael at gcc dot gnu.org
2011-04-04 13:35 ` kristopher.kuhlman at gmail dot com
2011-05-26 18:15 ` townsend at astro dot wisc.edu
2011-05-26 21:43 ` janus at gcc dot gnu.org
2011-05-26 21:47 ` townsend at astro dot wisc.edu
2011-05-27  4:02 ` kristopher.kuhlman at gmail dot com
2011-05-28 12:49 ` burnus at gcc dot gnu.org [this message]
2011-05-28 14:19 ` janus at gcc dot gnu.org
2011-05-28 14:43 ` dominiq at lps dot ens.fr
2011-05-28 15:12 ` janus at gcc dot gnu.org
2011-05-28 15:21 ` burnus at gcc dot gnu.org
2011-05-28 15:49 ` janus at gcc dot gnu.org
2011-05-28 16:56 ` dominiq at lps dot ens.fr
2011-05-28 17:57 ` janus at gcc dot gnu.org
2011-05-28 21:21 ` dominiq at lps dot ens.fr
2011-05-29 13:15 ` janus at gcc dot gnu.org
2011-05-29 20:33 ` janus at gcc dot gnu.org
2011-05-29 21:02 ` janus at gcc dot gnu.org
2011-05-29 21:36 ` townsend at astro dot wisc.edu
2011-06-08 13:13 ` kristopher.kuhlman at gmail dot com
2011-06-08 13:40 ` janus at gcc dot gnu.org
2011-06-08 13:49 ` kristopher.kuhlman at gmail dot com
2011-06-19 21:07 ` janus at gcc dot gnu.org
2011-06-19 21:16 ` janus at gcc dot gnu.org
2011-06-19 21:19 ` townsend at astro dot wisc.edu
2011-06-20  2:32 ` kristopher.kuhlman at gmail dot com

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=bug-47601-4-EqpzbnK9za@http.gcc.gnu.org/bugzilla/ \
    --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).