From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83613 invoked by alias); 17 Sep 2015 15:00:34 -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 83591 invoked by uid 89); 17 Sep 2015 15:00:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no 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; Thu, 17 Sep 2015 15:00:32 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A13838EA2F; Thu, 17 Sep 2015 15:00:31 +0000 (UTC) Received: from redhat.com (ovpn-204-20.brq.redhat.com [10.40.204.20]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8HF0QZm023801 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 17 Sep 2015 11:00:29 -0400 Date: Thu, 17 Sep 2015 15:06:00 -0000 From: Marek Polacek To: Bernd Edlinger Cc: Jeff Law , "gcc-patches@gcc.gnu.org" , Jakub Jelinek , "H.J. Lu" Subject: Re: [PATCH] Fix PR64078 Message-ID: <20150917150026.GC27588@redhat.com> References: <20150907100700.GC30849@redhat.com> <55EF3690.8030201@redhat.com> <55F050D5.3020408@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-09/txt/msg01293.txt.bz2 On Wed, Sep 09, 2015 at 07:48:15PM +0200, Bernd Edlinger wrote: > Hi, > > On Wed, 9 Sep 2015 09:31:33, Jeff Law wrote: > > You could probably make the function static or change its visibility via > > a function attribute (there's a visibility attribute which can take the > > values default, hidden protected or internal). Default visibility > > essentially means the function can be overridden. I think changing it > > to "protected" might work. Note if we do that, we may need some kind of > > target selector on the test since not all targets support the various > > visibility attributes. > > > > Yes, it works both ways: static works, and __attribute__ ((visibility ("protected"))) works too: > > make check-gcc-c++ RUNTESTFLAGS="ubsan.exp=object-size-9.c --target_board='unix{-fpic,-mcmodel=medium,-fpic\ -mcmodel=medium,-mcmodel=large,-fpic\ -mcmodel=large}'" > > has all tests passed, but.. > > make check-gcc-c++ RUNTESTFLAGS="ubsan.exp=object-size-9.c > --target_board='unix{-fno-inline}'" > > still fails in the same way for all workarounds: inline, static, and __attribute__ ((visibility ("protected"))). > > Maybe "static" would be preferable? Yeah, I'd go with static if that helps. I'd rather avoid playing games with visibility. Marek