This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40011] Problems with -fwhole-file
- From: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2009 07:37:37 -0000
- Subject: [Bug fortran/40011] Problems with -fwhole-file
- References: <bug-40011-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #42 from jv244 at cam dot ac dot uk 2009-07-28 07:37 -------
another issue I found is this:
> gfortran -fwhole-file test.f90
/tmp/cciOiaMB.o: In function `__m_MOD_b':
test.f90:(.text+0xa): undefined reference to `c_'
collect2: ld returned 1 exit status
> cat test.f90
SUBROUTINE c()
CALL a()
END SUBROUTINE c
SUBROUTINE a()
END SUBROUTINE a
MODULE M
CONTAINS
SUBROUTINE b()
CALL c()
END SUBROUTINE
END MODULE
USE M
CALL b()
END
things link fine if I swap the order of definition of the subroutines 'a' and
'c'
it is similar to PR40873, but happens with just -fwhole-file.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011