From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72442 invoked by alias); 3 Nov 2015 11:39:34 -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 72430 invoked by uid 89); 3 Nov 2015 11:39:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f181.google.com Received: from mail-yk0-f181.google.com (HELO mail-yk0-f181.google.com) (209.85.160.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 03 Nov 2015 11:39:32 +0000 Received: by ykft191 with SMTP id t191so12380777ykf.0 for ; Tue, 03 Nov 2015 03:39:30 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.129.76.14 with SMTP id z14mr21995933ywa.263.1446550770655; Tue, 03 Nov 2015 03:39:30 -0800 (PST) Received: by 10.37.117.136 with HTTP; Tue, 3 Nov 2015 03:39:30 -0800 (PST) In-Reply-To: <9581963.UiT3dqoIih@polaris> References: <20151014162944.GE16672@kam.mff.cuni.cz> <1693727.sAndYEapaL@polaris> <2A191FEA-C08A-4BEF-8AB5-420487E703CC@gmail.com> <9581963.UiT3dqoIih@polaris> Date: Tue, 03 Nov 2015 11:39:00 -0000 Message-ID: Subject: Re: Add VIEW_CONVERT_EXPR to operand_equal_p From: Richard Biener To: Eric Botcazou Cc: GCC Patches , Jan Hubicka Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00185.txt.bz2 On Tue, Nov 3, 2015 at 11:25 AM, Eric Botcazou wrote: >> I suggest to re-instantiate the canonical type checks for the aggregate type >> case. > > OK, thanks, this fixes all the known ICEs so far. > > Tested on x86_64-suse-linux, OK for the mainline? Please instead do the change here: /* For aggregates compare only the size. Accesses to fields do have a type information by themselves and thus we only care if we can i.e. use the types in move operations. */ else if (AGGREGATE_TYPE_P (inner_type) && TREE_CODE (inner_type) == TREE_CODE (outer_type)) return (TYPE_MODE (outer_type) != BLKmode || operand_equal_p (TYPE_SIZE (inner_type), TYPE_SIZE (outer_type), 0)); to return TYPE_CANONICAL (inner_type) && TYPE_CANONICAL (outer_type) == TYPE_CANONICAL (inner_type) Ok with that change. Richard. > > 2015-11-03 Eric Botcazou > > * gimple-expr.c (useless_type_conversion_p): Reinstate type canonical > check for aggregate types and beef up comment for mode check. > > > 2015-11-03 Eric Botcazou > > * gnat.dg/discr45.adb: Only compile the test. > > -- > Eric Botcazou