From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19019 invoked by alias); 24 Jul 2010 22:05:40 -0000 Received: (qmail 18966 invoked by uid 48); 24 Jul 2010 22:05:30 -0000 Date: Sat, 24 Jul 2010 22:05:00 -0000 Message-ID: <20100724220530.18965.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: 2010-07/txt/msg02729.txt.bz2 ------- Comment #20 from burnus at gcc dot gnu dot org 2010-07-24 22:05 ------- (In reply to comment #19) > $ gfortran -O2 -g gfortran.dg/entry_array_specs_2.f && ./a.out > gfortran.dg/entry_array_specs_2.f:16:0: internal compiler error: > in output_die, at dwarf2out.c:11046 I had a closer look at loc_1.f90. With this patch, the functions fn and foo are actually cloned and inlined - without this does not happen. Consequently, the ICE goes ways with -fno-inline. Thus, the patch might actually be correct and the bug could be at a completely different place. Additionally, the patch might give some performance boost :-) But first, the cause for the ICE has to be found. Any idea where to start searching? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873