From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102815 invoked by alias); 6 Nov 2015 19:15:32 -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 102774 invoked by uid 89); 6 Nov 2015 19:15:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Nov 2015 19:15:28 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-26-xj8WiqwlTFOwi7E_P9Jtzw-1; Fri, 06 Nov 2015 19:15:23 +0000 Received: from localhost ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Nov 2015 19:15:22 +0000 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Handle internal functions in is_tm_pure_call Date: Fri, 06 Nov 2015 19:15:00 -0000 Message-ID: <87k2pvrlbp.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: xj8WiqwlTFOwi7E_P9Jtzw-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-11/txt/msg00706.txt.bz2 The upcoming changes to use internal functions for things like sqrt caused a failure in gcc.dg/tm/20100610.c, because we were trying to get call flags from the null gimple_call_fn of an IFN_SQRT call. We've been making fairly heavy use of internal functions for a while now so I think this might be latent. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * trans-mem.c (is_tm_pure_call): Use gimple_call_flags for internal functions. diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 45bc759..4583bd5 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -266,6 +266,9 @@ is_tm_safe (const_tree x) static bool is_tm_pure_call (gimple *call) { + if (gimple_call_internal_p (call)) + return (gimple_call_flags (call) & (ECF_CONST | ECF_TM_PURE)) !=3D 0; + tree fn =3D gimple_call_fn (call); =20 if (TREE_CODE (fn) =3D=3D ADDR_EXPR)