From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8051 invoked by alias); 27 Jul 2009 14:47:58 -0000 Received: (qmail 8003 invoked by uid 48); 27 Jul 2009 14:47:42 -0000 Date: Mon, 27 Jul 2009 14:47:00 -0000 Message-ID: <20090727144742.8002.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: "burnus 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-07/txt/msg02169.txt.bz2 ------- Comment #1 from burnus at gcc dot gnu dot org 2009-07-27 14:47 ------- (Note: -fwhole-program implies -fwhole-file; the -O option is required.) Test case. Run with "-O1 -fwhole-program". Fails with: test.f90:(.text+0x1b): undefined reference to `three_' program prog call one() call two() end program prog subroutine one() call three() end subroutine one subroutine two() call three() end subroutine two subroutine three() end subroutine three -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pault at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873