From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23406 invoked by alias); 19 Feb 2015 12:44:51 -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 23397 invoked by uid 89); 19 Feb 2015 12:44:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 19 Feb 2015 12:44:50 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4DD40AC47; Thu, 19 Feb 2015 12:44:46 +0000 (UTC) Date: Thu, 19 Feb 2015 12:49:00 -0000 From: Richard Biener To: Tom de Vries cc: Jakub Jelinek , GCC Patches , Michael Matz Subject: Re: [PATCH][4/5] Handle internal_fn in operand_equal_p In-Reply-To: <54E5C403.7050606@mentor.com> Message-ID: References: <54E5BB06.2080102@mentor.com> <54E5C403.7050606@mentor.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-02/txt/msg01186.txt.bz2 On Thu, 19 Feb 2015, Tom de Vries wrote: > On 19-02-15 11:29, Tom de Vries wrote: > > Hi, > > > > I'm posting this patch series for stage1: > > - 0001-Disable-lang_hooks.gimplify_expr-in-free_lang_data.patch > > - 0002-Add-gimple_find_sub_bbs.patch > > - 0003-Factor-optimize_va_list_gpr_fpr_size-out-of-pass_std.patch > > - 0004-Handle-internal_fn-in-operand_equal_p.patch > > - 0005-Postpone-expanding-va_arg-until-pass_stdarg.patch > > > > The patch series - based on Michael's initial patch - postpones expanding > > va_arg > > until pass_stdarg, which makes pass_stdarg more robust. > > > > Bootstrapped and reg-tested on x86_64 using all languages, with unix/ and > > unix/-m32 testing. > > > > I'll post the patches in reply to this email. > > > > This patch adds handling of internal functions in operand_equal_p. > > I ran into a situation here in operand_equal_p where it segfaulted on the > internal function IFN_VA_ARG, because the CALL_EXPR_FN of an internal > function is NULL, and operand_equal_p does not expect NULL arguments: > ... > case CALL_EXPR: > /* If the CALL_EXPRs call different functions, then they > clearly can not be equal. */ > if (! operand_equal_p (CALL_EXPR_FN (arg0), CALL_EXPR_FN (arg1), > flags)) > return 0; > ... > > This patch fixes that by testing if CALL_EXPR_FN is NULL. > > OK for stage1? I'd call it a bug though, and we do have internal fns in generic already thus the issue is latent (with ubsan at least). Which means ok for trunk now. Thanks, Richard.