From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23139 invoked by alias); 19 Dec 2017 20:49: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 23126 invoked by uid 89); 19 Dec 2017 20:49:31 -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,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=fear 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; Tue, 19 Dec 2017 20:49:30 +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 C67CC5F7AF; Tue, 19 Dec 2017 20:49:28 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A2C9189F9; Tue, 19 Dec 2017 20:49:28 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id vBJKnNGd017663; Tue, 19 Dec 2017 21:49:24 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id vBJKnKOB015214; Tue, 19 Dec 2017 21:49:20 +0100 Date: Tue, 19 Dec 2017 20:49:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: David Malcolm , Nathan Sidwell , Richard Biener , gcc-patches List Subject: Re: [v2 of PATCH 06/14] Strip location wrappers in operand_equal_p Message-ID: <20171219204920.GA2353@tucnak> Reply-To: Jakub Jelinek References: <8533d574-bf9b-54f6-2683-bcd6fc813b56@redhat.com> <1513562874-38507-1-git-send-email-dmalcolm@redhat.com> <854827d5-adb8-70da-b025-eaf5ee8a02e8@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <854827d5-adb8-70da-b025-eaf5ee8a02e8@redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg01310.txt.bz2 On Tue, Dec 19, 2017 at 03:13:13PM -0500, Jason Merrill wrote: > On 12/17/2017 09:07 PM, David Malcolm wrote: > > On Mon, 2017-12-11 at 18:37 -0500, Jason Merrill wrote: > > > On 11/10/2017 04:45 PM, David Malcolm wrote: > > > > gcc/c-family/ChangeLog: > > > > * c-warn.c (sizeof_pointer_memaccess_warning): Strip any > > > > location > > > > wrappers from src and dest. > > > > > > Here the existing calls to tree_strip_nop_conversions ought to > > > handle > > > the wrappers. > > > > They don't; when EXP is a VIEW_CONVERT_EXPR wrapper around a VAR_DECL... > > > > 11887 static inline bool > > 11888 tree_nop_conversion (const_tree exp) > > 11889 { > > 11890 tree outer_type, inner_type; > > 11891 > > 11892 if (!CONVERT_EXPR_P (exp) > > 11893 && TREE_CODE (exp) != NON_LVALUE_EXPR) > > 11894 return false; > > > > ...tree_nop_conversion bails out at this "return false;", and hence > > tree_strip_nop_conversions simply returns the wrapper that was passed > > in. > > Right. So let's change tree_nop_conversion to return true. I'd fear that would break too much stuff, VIEW_CONVERT_EXPR is not a normal conversion, but reinterpretation of the bits. Or do you mean it should strip just the special VIEW_CONVERT_EXPR that has type identical to the operand's type? Jakub