public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "shapero at uw dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/58007] ICE in free_pi_tree(): Unresolved fixup - resolve_fixups does not fixup component of __class_bsr_Bsr_matrix
Date: Sun, 28 Jul 2013 16:45:00 -0000	[thread overview]
Message-ID: <bug-58007-4-Laf7o7vQDQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58007-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from shapero at uw dot edu ---
(In reply to Tobias Burnus from comment #2)
> Created attachment 30567 [details]
> Reduced test case
> 
> Reduced test case, which fails at least on my 86-64-gnu-linux system with a
> recent GCC 4.9. Compile as: 
> 
> $ gfortran matrix.f90 ellpack.f90 bsr.f90 matrix_c.f90
> matrix_c.f90:4.8:
>     use bsr
>         1
> Internal Error at (1):
> free_pi_tree(): Unresolved fixup
> 
> * * *
> 
> The triggered assert is:
> 221     free_pi_tree (pointer_info *p)
> 222     {
> 223       if (p == NULL)
> 224         return;
> 225
> 226       if (p->fixup != NULL)
> 227         gfc_internal_error ("free_pi_tree(): Unresolved fixup");
> 
> For the failing case, one has:
> 
> (gdb) p *p->fixup
> $4 = {pointer = 0x1678e08, next = 0x16780a0}
> 
> (gdb) p *p
> $2 = {priority = 38379, left = 0x1609dd0, right = 0x1606b20, integer = 6,
> type = P_COMPONENT, fixup = 0x1678f80, u = {pointer = 0x0, rsym = {sym =
> 0x0, true_name = 0x0, module = 0x0, binding_label = 0x0, stfixup = 0x0,
> symtree = 0x0, state = UNUSED, ns = 0, referenced = 0, renamed = 0, where =
> {column = 0, line = 0, pos = 0}}, wsym = {sym = 0x0, state = UNREFERENCED}}}
> 
> Here, *(p->fixup->pointer) == NULL and *p->fixup->next->pointer == NULL.
> 
> 
> Debugging shows that p->fixup->pointer is the address of the "cp" argument
> in the call to mio_pointer_ref in mio_component_ref for sym ==
> __class_bsr_Bsr_matrix and the component name "max_degreemio_pointer_ref".
> 
> And p->fixup->next->pointer is sym='__class_bsr_Bsr_matrix' and component
> name max_degreemio_pointer_ref
> 
> (i.e. the same, except that "cp" has a different pointer address.)
> 
> * * *
> 
> read_cleanup takes care of resolve_fixups - but only for p->type ==
> P_SYMBOL. However, we have here a p->type == P_COMPONENT.

I should have specified in my post but I'm using gfortran 4.7.2; your reduced
test case also fails for me. Could it be due to the explicit shape of the
return argument for bsr_get_neighbors?

Also, in reply to your first comment: should I be getting a type mismatch error
for the code I've written and my version of the compiler isn't working right,
or is my code compliant and versions 4.8/4.9 have a problem?


  parent reply	other threads:[~2013-07-28 16:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-28  4:02 [Bug fortran/58007] New: ICE -- free_pi_tree(): Unresolved fixup, depends on order of module inclusion shapero at uw dot edu
2013-07-28  7:49 ` [Bug fortran/58007] " burnus at gcc dot gnu.org
2013-07-28  9:50 ` [Bug fortran/58007] ICE in free_pi_tree(): Unresolved fixup - resolve_fixups does not fixup component of __class_bsr_Bsr_matrix burnus at gcc dot gnu.org
2013-07-28 16:45 ` shapero at uw dot edu [this message]
2013-08-13  8:59 ` janus at gcc dot gnu.org
2013-08-13 11:47 ` [Bug fortran/58007] [OOP] " mikael at gcc dot gnu.org
2013-08-14 16:19 ` mikael at gcc dot gnu.org
2013-08-14 16:23 ` mikael at gcc dot gnu.org
2013-08-14 16:46 ` mikael at gcc dot gnu.org
2013-09-11 16:05 ` townsend at astro dot wisc.edu
2013-12-06 10:31 ` [Bug fortran/58007] [4.7/4.9 Regression] " janus at gcc dot gnu.org
2013-12-19 15:19 ` rguenth at gcc dot gnu.org
2013-12-19 15:31 ` rguenth at gcc dot gnu.org
2013-12-24  0:37 ` townsend at astro dot wisc.edu
2013-12-25 16:06 ` mikael at gcc dot gnu.org
2014-01-18 20:21 ` mikael at gcc dot gnu.org
2014-01-18 21:24 ` mikael at gcc dot gnu.org
2014-01-26 13:05 ` mikael at gcc dot gnu.org
2014-01-26 14:50 ` mikael at gcc dot gnu.org
2014-01-26 14:52 ` mikael at gcc dot gnu.org
2014-01-27 21:23 ` mikael at gcc dot gnu.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=bug-58007-4-Laf7o7vQDQ@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).