From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8682 invoked by alias); 16 May 2010 11:04:24 -0000 Received: (qmail 5394 invoked by alias); 16 May 2010 11:04:09 -0000 Date: Sun, 16 May 2010 11:04:00 -0000 Message-ID: <20100516110409.5392.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: "rguenther at suse dot de" 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/msg01706.txt.bz2 ------- Comment #8 from rguenther at suse dot de 2010-05-16 11:04 ------- Subject: Re: -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away On Sun, 16 May 2010, dominiq at lps dot ens dot fr wrote: > ------- Comment #7 from dominiq at lps dot ens dot fr 2010-05-16 11:00 ------- > > -fwhole-program enables -fwhole-file. > > Yes, but -fwhole-file does not enable -fwhole-program. All the polyhedron tests > pass with -fwhole-file (and say -O3 -ffast-math), but the test in comment #4 > fails with -whole-file. -fwhole-file cannot enable -fwhole-program. -fwhole-program says to the optimizers that they do see the whole program - all callers to functions defined in the current TU have to be visible (and have correct callgraph edges, thus -fwhole-file). You cant' compare -fwhole-file numbers to -fwhole-program numbers. -fwhole-file is a correctness option, w/o it the Frontend generates an invalid representation for the middle-end. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873