From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32512 invoked by alias); 27 Jul 2009 13:57:53 -0000 Received: (qmail 32453 invoked by uid 48); 27 Jul 2009 13:57:35 -0000 Date: Mon, 27 Jul 2009 13:57:00 -0000 Subject: [Bug fortran/40873] New: -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away X-Bugzilla-Reason: CC Message-ID: 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/msg02164.txt.bz2 The option -fwhole-programs marks all functions in that file as local to that file, which facilitates inlining and dead-code elimination. That of cause assumes that all declarations are properly unified, which should be the case with -fwhole-file. However, the following Polyhedron testcases fail ac, aermod, doduc, gas_dyn, linpk, mdbx, rnflow and test_fpu at link time as too many functions have been elimated: $ gfortran -fwhole-program -O1 linpk.f90 /tmp/ccWhxrXN.o: In function `MAIN__': linpk.f90:(.text+0x759): undefined reference to `daxpy_' linpk.f90:(.text+0x7c7): undefined reference to `daxpy_' -- Summary: -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873