This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2009 15:34:35 -0000
- Subject: [Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
- References: <bug-40873-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-09-22 15:34 -------
Reconfirmed with current trunk. If I move three to the top of the file I
even get
/tmp/ccGHHCCU.o: In function `main':
t.f90:(.text+0x1e): undefined reference to `three_'
t.f90:(.text+0x28): undefined reference to `three_'
collect2: ld returned 1 exit status
this makes -fwhole-file less useful than necessary. LTO manages to fix up
the decls (thus, with -flto it builds and links fine with -fwhole-program).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2009-07-28 13:12:15 |2009-09-22 15:34:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873