From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105347 invoked by alias); 16 Oct 2015 15:57: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 105267 invoked by uid 89); 16 Oct 2015 15:57:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_20,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; Fri, 16 Oct 2015 15:57:22 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 74CDA27B605C; Fri, 16 Oct 2015 17:57:18 +0200 (CEST) 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 JP1g-a8riFfI; Fri, 16 Oct 2015 17:57:18 +0200 (CEST) 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 EC5C827B6060; Fri, 16 Oct 2015 17:57:17 +0200 (CEST) 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: Fri, 16 Oct 2015 15:58:00 -0000 Message-ID: <3370546.VBkdrdfpOC@polaris> User-Agent: KMail/4.14.9 (Linux/3.16.7-24-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20151015232415.GC4230@kam.mff.cuni.cz> References: <20151014162944.GE16672@kam.mff.cuni.cz> <1650238.MNS506uDsp@polaris> <20151015232415.GC4230@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart5314763.G7l4LO1Ft3" Content-Transfer-Encoding: 7Bit X-SW-Source: 2015-10/txt/msg01621.txt.bz2 This is a multi-part message in MIME format. --nextPart5314763.G7l4LO1Ft3 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 1302 > I wasn't aware that x86/IA-64 is still broken. I am flying to NY tomorrow > but will try to take a look. The ICEs are not caused by operand_equal_p > changes, but the change to useless_type_conversion to ignore mode on > aggregate types. Sure, but I'd like to avoid hiding new problems against preexisting ICEs. > A safe way would be to add the mode check back (as was in my original patch) > that does not change my original intent to separate CANONICAL_TYPE from > gimple semantic type equivalence machinery. It was however outcome of the > discussion that we would preffer the mode to be ignored in this case which > means fixing expansion side. What do we gain by doing this? Pretending that the mode doesn't matter is a lie at the RTL level and I don't see why GIMPLE would have to care. > I have no way to reproduce the IA-64 change, but will send proposed patch - > from backtrace it was clear where the wrong mode went in. Will wait with > operand_euqal_p changess until this is fixed. Thanks. I have installed 2 testcases that exhibit 2 distinct ICEs on x86-64, pack21.adb at -O0 and pack22.adb at -O1 (similar to the IA-64 one). PR middle-end/67966 * gnat.dg/pack21.adb: New test. * gnat.dg/pack22.adb: Likewise. * gnat.dg/pack22_pkg.ad[sb]: New helper. -- Eric Botcazou --nextPart5314763.G7l4LO1Ft3 Content-Disposition: attachment; filename="pack21.adb" Content-Transfer-Encoding: 7Bit Content-Type: text/x-adasrc; charset="utf-8"; name="pack21.adb" Content-length: 526 -- { dg-do compile } -- { dg-options "-gnatws" } procedure Pack21 is type Enum is (ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, ELEVEN, TWELVE, THIRTEEN, FOURTEEN, FIFTEEN); type Rec1 is record I1 : INTEGER range 0 .. 800; I2 : INTEGER range 0 .. 15 := 0; E : Enum; end record; pragma PACK (Rec1); type Rec2 is record F : Rec1; end record; for Rec2 use record F at 0 range 2 .. 19; end record; R1, R2 : Rec2; begin null; end; --nextPart5314763.G7l4LO1Ft3 Content-Disposition: attachment; filename="pack22.adb" Content-Transfer-Encoding: 7Bit Content-Type: text/x-adasrc; charset="utf-8"; name="pack22.adb" Content-length: 371 -- { dg-do compile } -- { dg-options "-O -gnatws" } with Pack22_Pkg; use Pack22_Pkg; procedure Pack22 is package Role_Map is new Bit_Map_Generic; type Role_List is new Role_Map.List; Roles_1 : Role_List; Roles_2 : Role_List; Roles_3 : Role_List; begin Temp_buffer := (others => 1); Temp_Buffer(2) := (0); Roles_1 := Roles_2 xor Roles_3; end; --nextPart5314763.G7l4LO1Ft3 Content-Disposition: attachment; filename="pack22_pkg.adb" Content-Transfer-Encoding: 7Bit Content-Type: text/x-adasrc; charset="utf-8"; name="pack22_pkg.adb" Content-length: 351 package body Pack22_Pkg is package body Bit_Map_Generic is function "xor" (L, R : List) return List is Temp : List; for Temp'address use Temp_buffer'address; begin Temp.Bits := L.Bits xor R.Bits; Temp.Counter.Counter := 0; return Temp; end; end Bit_Map_Generic; end Pack22_Pkg; --nextPart5314763.G7l4LO1Ft3 Content-Disposition: attachment; filename="pack22_pkg.ads" Content-Transfer-Encoding: 7Bit Content-Type: text/x-adasrc; charset="utf-8"; name="pack22_pkg.ads" Content-length: 1557 package Pack22_Pkg is type byte is mod 256; Temp_buffer : array (0..8) of byte:= (others => 0); for Temp_buffer'Alignment use 2; subtype Id is Short_integer; generic Dummy : Integer := 0; package Bit_Map_Generic is type List is private; function "xor" (L, R : List) return List; private type Offset_T is range 0 .. Id'Last; type Counter_T is new short_integer; for Counter_T'Size use 16; type Bit_List is array (Id range <>) of Boolean; pragma Pack (Bit_List); type List_Counter_T (Is_Defined : Boolean := True) is record Dummy : Boolean := False; case Is_Defined is when True => Counter : Counter_T := 0; when False => null; end case; end record; for List_Counter_T use record Is_Defined at 0 range 0 .. 7; Dummy at 1 range 0 .. 7; Counter at 2 range 0 .. 15; end record; type List is record Offset : Offset_T := Offset_T (1) - 1; Counter : List_Counter_T; Bits : Bit_List (1 .. 6); end record; for List use record Offset at 0 range 0 .. 15; Counter at 2 range 0 .. 31; end record; type Iterator is record No_More_Id : Boolean := True; Current_Id : Id; The_List : List; end record; end Bit_Map_Generic; end Pack22_Pkg; --nextPart5314763.G7l4LO1Ft3--