From patchwork Mon Jul 1 09:06:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1125135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-504041-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ucw.cz Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45chML6fktz9s4Y for ; Mon, 1 Jul 2019 19:06:52 +1000 (AEST) 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=U7y3oWArFI+1QQhSfS+HpJ0Vsn0Zd+9H+LKkwH2+aCqi3ScDNSHYK +KgYmbDsO4hbK8Yp9+dBxLMQyr1yDvKfLl94MQYlSP0XBriSSVPiqjMbIdvrlo+g XOgX3qINrSO5RhmKFqi83uwA7Imqnc6JWjd7kTzpaA69/tQJn9AiLs= 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=g3onD5u27y2Z4EUkzZHVLFGqqTE=; b=W69d7HSpyAxbW8TzbECQ jUBkwVZ0rEzXBGvjRE3N2ajmF4J8pKMmWo9Kux2sheiCxb7FF4ihsh1GgJb9dhNg j7IHj4VwSQq2RTFfhiNEEX00O2odGC5Jhgy4cjNdsPO0mJAZmsXLabLzQpqXIyDr VHvkuZA8KWNf3U5qDJ1FXlc= Received: (qmail 89082 invoked by alias); 1 Jul 2019 09:06:44 -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 89074 invoked by uid 89); 1 Jul 2019 09:06:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS autolearn=ham version=3.3.1 spammy=gen-attrs-67.C, genattrs67c, genattrs67C, gen-attrs-67.c X-HELO: nikam.ms.mff.cuni.cz 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 ESMTP; Mon, 01 Jul 2019 09:06:38 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 848312825B4; Mon, 1 Jul 2019 11:06:34 +0200 (CEST) Date: Mon, 1 Jul 2019 11:06:34 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix g++.dg/lto/alias-1 and 2 for non-plugin builds Message-ID: <20190701090634.oqbh2decqcop55iq@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, alias-1 and alias-2 fails with -fno-use-inliner-plugin because the inlinig it relies on does not happen. This is because w/o resolution info we can not optimize away the offline copy and we know that main is executed once and optimize for size. Bootsrapped/regtested x86_64-linux, comitted. Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 272846) +++ ChangeLog (working copy) @@ -1,3 +1,11 @@ +2019-07-01 Jan Hubicka + + PR lto/91028 + PR lto/90720 + * g++.dg/lto/alias-1_0.C: Add loop to make inlining happen with + -fno-use-linker-plugin + * g++.dg/lto/alias-2_0.C: Likewise. + 2019-07-01 Dominique d'Humieres * g++.dg/cpp0x/gen-attrs-67.C: Add error for darwin. Index: g++.dg/lto/alias-1_0.C =================================================================== --- g++.dg/lto/alias-1_0.C (revision 272846) +++ g++.dg/lto/alias-1_0.C (working copy) @@ -17,6 +17,7 @@ __attribute__ ((used)) struct b **bptr = (struct b**)&aptr; extern void init (); extern void inline_me_late (int); +int n=1; int @@ -24,7 +25,8 @@ main (int argc, char **argv) { init (); aptr = 0; - inline_me_late (argc); + for (int i=0; i