From patchwork Tue Aug 19 11:05:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Wielaard X-Patchwork-Id: 381331 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 07AAF14007D for ; Tue, 19 Aug 2014 21:09:21 +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 :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=CLx3eyqYONAfhusNZHW/aAIl7HkBW2kjnnuGfN6XmyWhC7ZWmKlAn bL8tYMRgOjiMpACHiY01EdaS5dpLt32osSJbMQIr7lpnuaflQGI4Dhs7xoBOOIY0 NX/mgtPjdqAlYfFSua/wuhshg5XVcKmLecZUzirNwGYJ5hAGzo0LLw= 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:subject:from:to:cc:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; s=default; bh=G+s54Nr7NsjbjO7tPjBF5Uy044c=; b=GPsw5Ex3QPT5eaBQBBmyoEjzMXu+ uw7epBML9Zg5+dMDXhzerMs4SlhkyC6wXSXT1XuOZY06Bav3OXZfJyXVCLOTNtSC +1GcDBfoofj9W3GaF/ffL9zyG09pK2Gq6k4BaByGZE7Vo0srijkmwMpsqee5Xvzt TeCZTS6YelDav3s= Received: (qmail 31926 invoked by alias); 19 Aug 2014 11:06:04 -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 31911 invoked by uid 89); 19 Aug 2014 11:06:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 19 Aug 2014 11:06:03 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7JB61LP015420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Aug 2014 07:06:02 -0400 Received: from bordewijk.wildebeest.org (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7JB60kX012443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 19 Aug 2014 07:06:01 -0400 Received: by bordewijk.wildebeest.org (Postfix, from userid 1000) id 57A308188002; Tue, 19 Aug 2014 13:05:59 +0200 (CEST) Message-ID: <1408446359.3370.12.camel@bordewijk.wildebeest.org> Subject: Re: [PATCH] Add guality [p]type test. From: Mark Wielaard To: Richard Biener Cc: GCC Patches , Jason Merrill , Cary Coutant , Alexandre Oliva , Jakub Jelinek Date: Tue, 19 Aug 2014 13:05:59 +0200 In-Reply-To: References: <1403265071.6147.5.camel@bordewijk.wildebeest.org> <1404381209-11280-1-git-send-email-mjw@redhat.com> Mime-Version: 1.0 On Mon, 2014-07-07 at 11:57 +0200, Richard Biener wrote: > Btw, why doesn't it succeed with LTO? I suspect it's because > we drop the unused variables - try adding __attribute__((used)) to > them. You are right, this makes the whole new test PASS also with LTO: 2014-08-19 Mark Wielaard * gcc.dg/guality/const-volatile.c: Add `used' attribute to pi. OK to commit? Thanks, Mark diff --git a/gcc/testsuite/gcc.dg/guality/const-volatile.c b/gcc/testsuite/gcc.dg/guality/const-volatile.c index 6c2b617..86460e4 100644 --- a/gcc/testsuite/gcc.dg/guality/const-volatile.c +++ b/gcc/testsuite/gcc.dg/guality/const-volatile.c @@ -7,7 +7,7 @@ const int ci; volatile int vi; const volatile int cvi; -int *pi; +int *pi __attribute__((used)); const int *pci; volatile int *pvi; const volatile int *pcvi;