From patchwork Mon Sep 2 18:05:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 272032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 34FD82C009E for ; Tue, 3 Sep 2013 04:05:13 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=Il7KtGz5yg+Wckrf8KTp01MCI2UYPAsB7M3yGYz92eqaDwcXByl5k LaXBmlTSKbTp34lrDtfGOaBr3+p8vV7kl1po9ZQNxljA3NhlaVGmUyynyrtUpRhT DN+1L7Rd0PN3blTjakt0rbDE5Lz83hwwIcIBVNVWXlItPGq3KhCW4o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=5BED1qgH2It8AqR2rt6l8mYlisw=; b=Y8uF1wvN44ER8f6RmMuk 1x1c3lCEyMJAEq1VKxZZiglu2H5Y+ZKocgkvFD4gCfrOTXhLsYAoHxhcP+h5aKOc 8LlTjO4Jc2zMnvvDR4wnEI07GJ8rJ7yIdHOyJjET40149W3MD5pR7/XqyNWkwDKx 6Vmki5wnEXTPnZ+cOBC3aOs= Received: (qmail 1164 invoked by alias); 2 Sep 2013 18:05:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 1150 invoked by uid 89); 2 Sep 2013 18:05:06 -0000 Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 02 Sep 2013 18:05:06 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, NO_RELAYS autolearn=ham version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id DDAF5543924; Mon, 2 Sep 2013 20:05:01 +0200 (CEST) Date: Mon, 2 Sep 2013 20:05:01 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix gcc.dg/lto/20090218-1.c Message-ID: <20130902180501.GD5201@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Hi, gcc.dg/lto/20090218-1.c contains cross module call into always_inline function. At -O0 -flto we used to report nothing since optimize_inline_calls was not called. With my change we report it as error. I am not sure what is desired behaviour, but for now I am restoring the previous situation that is consistent with non-lto build. I suppose it is good thing to do given that we promise always inlines to be always inline only within given module. I am testing the patch on x86_64-linux and will commit it if testing passes. Honza * ipa-inline-transform.c (inline_transform): Do not optimize inline calls when not optimizing. Index: ipa-inline-transform.c =================================================================== --- ipa-inline-transform.c (revision 202182) +++ ipa-inline-transform.c (working copy) @@ -432,7 +432,7 @@ inline_transform (struct cgraph_node *no ipa_remove_all_references (&node->symbol.ref_list); timevar_push (TV_INTEGRATION); - if (node->callees) + if (node->callees && optimize) todo = optimize_inline_calls (current_function_decl); timevar_pop (TV_INTEGRATION);