From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86976 invoked by alias); 28 Oct 2015 22:34:40 -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 86887 invoked by uid 89); 28 Oct 2015 22:34:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 28 Oct 2015 22:34:38 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 30EE7283E366; Wed, 28 Oct 2015 23:34:36 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tU6GXSFZYqnv; Wed, 28 Oct 2015 23:34:36 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id E844A283E29B; Wed, 28 Oct 2015 23:34:35 +0100 (CET) From: Eric Botcazou To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org, Richard Biener Subject: Re: Add VIEW_CONVERT_EXPR to operand_equal_p Date: Wed, 28 Oct 2015 22:49:00 -0000 Message-ID: <2210014.Qgk3pAbeYD@polaris> User-Agent: KMail/4.14.9 (Linux/3.16.7-24-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20151021215701.GA14675@atrey.karlin.mff.cuni.cz> References: <20151014162944.GE16672@kam.mff.cuni.cz> <1456448.Tt4DpGVrAE@polaris> <20151021215701.GA14675@atrey.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1870581.FtlpQ7Q7Jr" Content-Transfer-Encoding: 7Bit X-SW-Source: 2015-10/txt/msg03116.txt.bz2 This is a multi-part message in MIME format. --nextPart1870581.FtlpQ7Q7Jr Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 784 > Added and comitted now. Thanks. Now on to the wrong code issues. :-) Up to the change, the useless_type_conversion_p predicate was relying on structural equivalence via the TYPE_CANONICAL check, now it only looks at the outermost level (size, mode). Now some back-ends, most notably x86-64, do a deep structural scan to determine the calling conventions (classify_argument) instead of just looking at the size and the mode, so consistency dictates that the type of the argument and that of the parameter be structurally equivalent and this sometimes can only be achieved by a VCE... which is now deleted. :-( See the call to derivedIP in the attached testcase which now fails on x86-64. How do we get away from here? * gnat.dg/discr44.adb: New test. -- Eric Botcazou --nextPart1870581.FtlpQ7Q7Jr Content-Disposition: attachment; filename="discr44.adb" Content-Transfer-Encoding: 7Bit Content-Type: text/x-adasrc; charset="UTF-8"; name="discr44.adb" Content-length: 496 -- { dg-do run } -- { dg-options "-gnatws" } procedure Discr44 is function Ident (I : Integer) return Integer is begin return I; end; type Int is range 1 .. 10; type Str is array (Int range <>) of Character; type Parent (D1, D2 : Int; B : Boolean) is record S : Str (D1 .. D2); end record; type Derived (D : Int) is new Parent (D1 => D, D2 => D, B => False); X1 : Derived (D => Int (Ident (7))); begin if X1.D /= 7 then raise Program_Error; end if; end; --nextPart1870581.FtlpQ7Q7Jr--