From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7310 invoked by alias); 15 May 2010 19:54:02 -0000 Received: (qmail 7138 invoked by uid 48); 15 May 2010 19:53:32 -0000 Date: Sat, 15 May 2010 19:54:00 -0000 Message-ID: <20100515195332.7137.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: "dominiq at lps dot ens dot fr" 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: 2010-05/txt/msg01665.txt.bz2 ------- Comment #5 from dominiq at lps dot ens dot fr 2010-05-15 19:53 ------- A few comments: (1) adding -flto or -fwhopr solves the linking problem for the polyhedron tests and the reduced one in comment #1. (2) the test in comment #4 is different as it shows up for -fwhole-file and is not solved with -flto or -fwhopr. (3) I have been puzzled by the results in http://users.physik.fu-berlin.de/~tburnus/gcc-trunk/benchmark/ for fatigue.f90. It is due to -fwhole-program: [macbook] lin/test% gfc -O3 -ffast-math -fwhole-file -flto fatigue.f90 [macbook] lin/test% time a.out ... 9.223u 0.004s 0:09.23 99.8% 0+0k 0+0io 0pf+0w [macbook] lin/test% gfc -O3 -ffast-math -fwhole-program fatigue.f90 [macbook] lin/test% time a.out ... 6.482u 0.004s 0:06.49 99.8% 0+0k 0+0io 0pf+0w It would be interesting to understand why and to keep this nice speed up when fixing this pr. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873