From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100957 invoked by alias); 16 Oct 2015 06:45:46 -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 100932 invoked by uid 89); 16 Oct 2015 06:45:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from Unknown (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 16 Oct 2015 06:43:19 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id B84A0543D1A; Fri, 16 Oct 2015 08:43:09 +0200 (CEST) Date: Fri, 16 Oct 2015 06:45:00 -0000 From: Jan Hubicka To: Andreas Schwab Cc: Jan Hubicka , Eric Botcazou , gcc-patches@gcc.gnu.org, Richard Biener , Bernd Schmidt , law@redhat.com Subject: Re: Do not use TYPE_CANONICAL in useless_type_conversion Message-ID: <20151016064309.GD45365@kam.mff.cuni.cz> References: <20151002180022.GA32564@kam.mff.cuni.cz> <20151008034934.GB47818@kam.mff.cuni.cz> <3499233.dG6t8mJFET@polaris> <20151008230518.GE90964@kam.mff.cuni.cz> <877fmwbdth.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877fmwbdth.fsf@igel.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-10/txt/msg01534.txt.bz2 > Jan Hubicka writes: > > > Does the patch in https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00902.html help? > > No, it doesn't. > Andreas, I am sorry for getting late to this. I hoped that the alternative patch by Alexandre would fix this. I still don't know how to reproduce without IA-64 box, so I am attaching a patch that I think should fix it. Does the attached patch work? Thank you, Jan Index: expr.c =================================================================== --- expr.c (revision 228851) +++ expr.c (working copy) @@ -6669,9 +6669,16 @@ store_field (rtx target, HOST_WIDE_INT b GET_MODE_BITSIZE (GET_MODE (temp)) - bitsize, NULL_RTX, 1); + /* We allow move between structures of same size but different mode. + If source is in memory and the mode differs, simply change the memory. */ + if (GET_MODE (temp) == BLKmode && mode != BLKmode) + { + gcc_assert (MEM_P (temp)); + temp = adjust_address_nv (temp, mode, 0); + } /* Unless MODE is VOIDmode or BLKmode, convert TEMP to MODE. */ - if (mode != VOIDmode && mode != BLKmode - && mode != TYPE_MODE (TREE_TYPE (exp))) + else if (mode != VOIDmode && mode != BLKmode + && mode != TYPE_MODE (TREE_TYPE (exp))) temp = convert_modes (mode, TYPE_MODE (TREE_TYPE (exp)), temp, 1); /* If TEMP is not a PARALLEL (see below) and its mode and that of TARGET