From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15014 invoked by alias); 28 Jul 2010 13:52:16 -0000 Received: (qmail 14947 invoked by uid 48); 28 Jul 2010 13:51:51 -0000 Date: Wed, 28 Jul 2010 13:52:00 -0000 Message-ID: <20100728135151.14946.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/45087] -fwhole-program: Miscompiled due to wrong decls 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/msg03088.txt.bz2 ------- Comment #5 from burnus at gcc dot gnu dot org 2010-07-28 13:51 ------- (In reply to comment #3) > Minimal test case, compile with: There is something odd: If one has the order subroutine VALUE() subroutine NEXT it actually works; one then goes gfc_create_function_decl for VALUE gfc_get_extern_function_decl for NEXT call gfc_create_function_decl for NEXT while for the opposite order it fails: gfc_create_function_decl for NEXT gfc_create_function_decl for VALUE gfc_get_extern_function_decl for NEXT In both cases the backend_decl is used in gfc_get_extern_function_decl. And in all cases it seems as if the the module's next's gsym->...->backend_decl == NULL. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087