From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107253 invoked by alias); 19 Feb 2018 19:33:57 -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 107239 invoked by uid 89); 19 Feb 2018 19:33:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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 ESMTP; Mon, 19 Feb 2018 19:33:55 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 75C6AC057F84; Mon, 19 Feb 2018 19:33:54 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-67.rdu2.redhat.com [10.10.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA520600C2; Mon, 19 Feb 2018 19:33:52 +0000 (UTC) Subject: Re: [PATCH] Fix builtin_mathfn_code ICE on internal fns (PR c++/84444) To: Jakub Jelinek , Richard Biener , Jason Merrill Cc: gcc-patches@gcc.gnu.org References: <20180219191115.GS5867@tucnak> From: Jeff Law Message-ID: Date: Mon, 19 Feb 2018 19:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180219191115.GS5867@tucnak> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg01118.txt.bz2 On 02/19/2018 12:11 PM, Jakub Jelinek wrote: > Hi! > > Many years ago Jason has added call to get_callee_fndecl, which does the > right thing for internal functions as well as handles ADDR_EXPR and also > casts and constant function pointers with a usable DECL_INITIAL, so while > to fix this PR I could have added || CALL_EXPR_FN (t)) == NULL_TREE before > the || TREE_CODE (CALL_EXPR_FN (t)) != ADDR_EXPR check, IMHO it is just > better to remove it, get_callee_fndecl will DTRT. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2018-02-19 Jakub Jelinek > > PR c++/84444 > * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t) > is ADDR_EXPR. > > * g++.dg/cpp1z/launder8.C: New test. OK. jeff