From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47262 invoked by alias); 7 Sep 2015 13:46:09 -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 47242 invoked by uid 89); 7 Sep 2015 13:46:08 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: DUB004-OMC2S26.hotmail.com Received: from dub004-omc2s26.hotmail.com (HELO DUB004-OMC2S26.hotmail.com) (157.55.1.165) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Mon, 07 Sep 2015 13:46:07 +0000 Received: from DUB118-W39 ([157.55.1.138]) by DUB004-OMC2S26.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 7 Sep 2015 06:46:03 -0700 X-TMN: [bRC9H9vAKWug8RazGfMugv2td/MRMGLF] Message-ID: From: Bernd Edlinger To: Marek Polacek CC: "gcc-patches@gcc.gnu.org" , Jakub Jelinek , "H.J. Lu" Subject: RE: [PATCH] Fix PR64078 Date: Mon, 07 Sep 2015 13:46:00 -0000 In-Reply-To: <20150907100700.GC30849@redhat.com> References: ,<20150907100700.GC30849@redhat.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00439.txt.bz2 Hi, On Mon, 7 Sep 2015 12:07:00, Marek Polacek wrote: > > On Sun, Sep 06, 2015 at 07:21:13PM +0200, Bernd Edlinger wrote: >> Hi, >> >> we observed sporadic failures of the following two test cases (see PR640= 78): >> c-c++-common/ubsan/object-size-9.c and c-c++-common/ubsan/object-size-10= .c >> >> For object-size-9.c this happens in a reproducible way when -fpic option= is used: >> If that option is used, it is slightly less desirable to inline the func= tions, but if an explicit >> "inline" is added, the function is still in-lined, even if -fpic is used. > > So if we rely on the function being inlined I think it would be better to= add > the always_inline attribute. > I tried to replace inline by __attribute__((always_inline)), but unfortunat= ely it does not work: FAIL: c-c++-common/ubsan/object-size-9.c=A0=A0 -O2=A0 (test for excess erro= rs) Excess errors: /home/ed/gnu/gcc-trunk/gcc/testsuite/c-c++-common/ubsan/object-size-9.c:47:= 1: warning: always_inline function might not be inlinable [-Wattributes] /home/ed/gnu/gcc-trunk/gcc/testsuite/c-c++-common/ubsan/object-size-9.c:32:= 1: warning: always_inline function might not be inlinable [-Wattributes] /home/ed/gnu/gcc-trunk/gcc/testsuite/c-c++-common/ubsan/object-size-9.c:47:= 1: error: inlining failed in call to always_inline 'C f3(int)': function bo= dy can be overwritten at link time /home/ed/gnu/gcc-trunk/gcc/testsuite/c-c++-common/ubsan/object-size-9.c:94:= 10: error: called from here the diagnostics are just a little different when the function is inlined or= not. Bernd. =20=09=09=20=09=20=20=20=09=09=20=20