From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5671 invoked by alias); 22 Sep 2009 15:34:51 -0000 Received: (qmail 5584 invoked by uid 48); 22 Sep 2009 15:34:35 -0000 Date: Tue, 22 Sep 2009 15:34:00 -0000 Message-ID: <20090922153435.5583.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg02082.txt.bz2 ------- 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