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

            Bug ID: 58007
           Summary: ICE -- free_pi_tree(): Unresolved fixup, depends on
                    order of module inclusion
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shapero at uw dot edu

I have a moderate-size code I've been developing in Fortran 2003. I've tried to
reproduce it with small test cases to no avail -- perhaps I can give a link to
my git repository with instructions?


The following should work just fine:

git clone https://github.com/danshapero/fempack.git
git checkout e7547abe131b5c0e137fb0327069a75fcfed5d90
make libs


However, make the following change to src/linalg/linalg.f90:

-    use bsr
     use ellpack
     use csr
+    use bsr

and the following error results:

Internal Error at (1):
free_pi_tree(): Unresolved fixup
make: *** [src/linalg/linalg.o] Error 1

If it makes a difference, I'm using polymorphism somewhat extensively.


I've seen the following bug reports with similar behavior before: 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47546
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47601
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53015
In 47546, it's suggested that the error can be fixed by using implicit instead
of explicit shape arrays; all my arrays are implicit shape, so it's not that.
I'm compiling with just the -J flag; in 53015 it was suggested that using both
-I and -J can contribute to the problem.

While I might be able to make my code compile by cramming a bunch of modules
all together, it would make everything less, well, modular. Not desirable.

Hope the instructions were helpful and thanks for the help!

Reply via email to