From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11314 invoked by alias); 19 Aug 2014 11:23:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 11301 invoked by uid 89); 19 Aug 2014 11:23:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f42.google.com Received: from mail-wg0-f42.google.com (HELO mail-wg0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 19 Aug 2014 11:23:02 +0000 Received: by mail-wg0-f42.google.com with SMTP id l18so6157119wgh.1 for ; Tue, 19 Aug 2014 04:22:59 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.21.208 with SMTP id x16mr5900964wie.73.1408447379460; Tue, 19 Aug 2014 04:22:59 -0700 (PDT) Received: by 10.194.20.69 with HTTP; Tue, 19 Aug 2014 04:22:59 -0700 (PDT) In-Reply-To: <1408446359.3370.12.camel@bordewijk.wildebeest.org> References: <1403265071.6147.5.camel@bordewijk.wildebeest.org> <1404381209-11280-1-git-send-email-mjw@redhat.com> <1408446359.3370.12.camel@bordewijk.wildebeest.org> Date: Tue, 19 Aug 2014 11:23:00 -0000 Message-ID: Subject: Re: [PATCH] Add guality [p]type test. From: Richard Biener To: Mark Wielaard Cc: GCC Patches , Jason Merrill , Cary Coutant , Alexandre Oliva , Jakub Jelinek Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01842.txt.bz2 On Tue, Aug 19, 2014 at 1:05 PM, Mark Wielaard wrote: > 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? Ok. Thanks, Richard. > 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; >