From patchwork Wed Feb 27 13:23:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1048875 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-497112-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kXPcGX/h"; dkim-atps=neutral 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 448bwc52zhz9s1B for ; Thu, 28 Feb 2019 00:23:26 +1100 (AEDT) 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=r5nltyS1GXlYuUf3UHYsEqlJ4sQaX4ng2Rk9RykaiAFPLknwMMA++ rHX8GhhpDK2fDhRiHf8iNzpFyGFYUepY3qqolYicrPh8V9WeN0PEUon+fZY9x5Qf edBSBlEmfy3zggsgp96iUrF/MaQJG4Hh8NhVL3z/ffxbpvn0MGrOPc= 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=wLWh/jmsBnXl8egkM7qIaUI3Dbk=; b=kXPcGX/huLiKNwQyF5He 4StHwdNKEMiy44pkOZQl3DsmAZoGN1lyToG4fc7qmR3UbjUq2t232NndSuvbGqwc lk/ATATTcH3EZbLmuija7EKhzGchbMChguPA/YoTiNYx2JNi7T20USVphBluZQsN xBwO+Lh3+E5uvrCG+kH4hGs= Received: (qmail 44115 invoked by alias); 27 Feb 2019 13:23:19 -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 44098 invoked by uid 89); 27 Feb 2019 13:23:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Feb 2019 13:23:17 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6CAB4B053 for ; Wed, 27 Feb 2019 13:23:15 +0000 (UTC) Date: Wed, 27 Feb 2019 14:23:15 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix GIMPLE FE with calls and startwith Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Turns out the cgraph code isn't happy if cgraph edge (re-)building is skipped. Tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2019-02-27 Richard Biener * passes.c (should_skip_pass_p): Do not skip cgraph-edge building. * gcc.dg/gimplefe-36.c: New testcase. Index: gcc/passes.c =================================================================== --- gcc/passes.c (revision 269247) +++ gcc/passes.c (working copy) @@ -2380,6 +2380,10 @@ should_skip_pass_p (opt_pass *pass) && pass->properties_provided != 0) return false; + /* We need to (re-)build cgraph edges as needed. */ + if (strstr (pass->name, "build_cgraph_edges") != NULL) + return false; + /* Don't skip df init; later RTL passes need it. */ if (strstr (pass->name, "dfinit") != NULL) return false; Index: gcc/testsuite/gcc.dg/gimplefe-36.c =================================================================== --- gcc/testsuite/gcc.dg/gimplefe-36.c (nonexistent) +++ gcc/testsuite/gcc.dg/gimplefe-36.c (working copy) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fgimple" } */ + +int foo (void); + +void __GIMPLE (startwith("fre1")) +d () +{ + int _1; + +bb_2: + _1 = foo (); + return; +}