From patchwork Tue Mar 3 10:39:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 445657 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 18B8214009B for ; Tue, 3 Mar 2015 21:39:30 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=rbqPhqoO; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=V/97D+1pgYsEfx5hYk340qVT2MKhsKi33xmBVyuKNGT adh1UJNNLJ4BMpbK2QvReon6/tyaXp/1Im4NmvHCtmJyfQHzM6cxkYa3RIsfu8wq A06HMgg7ZyzEgBDpn8CQ7w5wcAba7qcTaGEWcknYye4JwT6H6OOzNpXUi2PsJWPA = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=ulfh+SJdOPigOJgvzOAHr/spcxQ=; b=rbqPhqoO8sl4yrCIh TNp4PbfkGVhwX6hSVTmrrOIVPUTe85bUbz3EzwtGoNHU1VB9yuyBF9E/PgpbKUHD rxHq7QnW7ceM0+HR07UP5Pr0Qov1Fw5JvgCYatiil5gydJstpfeQ9izamoPDrFkl Tw9Gp37759CpMVThtP0mf6qois= Received: (qmail 16627 invoked by alias); 3 Mar 2015 10:39:22 -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 16609 invoked by uid 89); 3 Mar 2015 10:39:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 03 Mar 2015 10:39:20 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B03C0AEA9; Tue, 3 Mar 2015 10:39:16 +0000 (UTC) Message-ID: <54F58F54.9040604@suse.cz> Date: Tue, 03 Mar 2015 11:39:16 +0100 From: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: "hubicka >> Jan Hubicka" Subject: [PATCH] Fix PR ipa/65287 X-IsSubscribed: yes Hello. There's suggested patch for the issue that survives regression tests on x86_64-linux-pc. Ready for trunk? Thanks, Martin From d4e9d2906a90151d1239e7b32b00f7cb46b045fa Mon Sep 17 00:00:00 2001 From: mliska Date: Tue, 3 Mar 2015 10:36:59 +0100 Subject: [PATCH] Fix PR ipa/65287. gcc/testsuite/ChangeLog: 2015-03-03 Martin Liska * gcc.dg/ipa/pr65287.c: New test. gcc/ChangeLog: 2015-03-03 Martin Liska PR ipa/65287 * ipa-icf.c (sem_variable::parse): Skip all alias variables. --- gcc/ipa-icf.c | 3 ++- gcc/testsuite/gcc.dg/ipa/pr65287.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/ipa/pr65287.c diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 155b96b..14ccea5 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -1681,7 +1681,8 @@ sem_variable::equals (tree t1, tree t2) sem_variable * sem_variable::parse (varpool_node *node, bitmap_obstack *stack) { - if (TREE_THIS_VOLATILE (node->decl) || DECL_HARD_REGISTER (node->decl)) + if (TREE_THIS_VOLATILE (node->decl) || DECL_HARD_REGISTER (node->decl) + || node->alias) return NULL; sem_variable *v = new sem_variable (node, 0, stack); diff --git a/gcc/testsuite/gcc.dg/ipa/pr65287.c b/gcc/testsuite/gcc.dg/ipa/pr65287.c new file mode 100644 index 0000000..9292984 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/pr65287.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +const int __new_sys_siglist[] = {}; + +extern __typeof(__new_sys_siglist) _new_sys_siglist + __attribute__((alias("__new_sys_siglist"))); +extern __typeof(__new_sys_siglist) _sys_siglist + __attribute__((alias("__new_sys_siglist"))); + +int main() +{ + return 0; +} -- 2.1.2