From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from impout007.msg.chrl.nc.charter.net (impout007aa.msg.chrl.nc.charter.net [47.43.20.31]) by sourceware.org (Postfix) with ESMTPS id 2ED223858024; Thu, 1 Apr 2021 00:28:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2ED223858024 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=charter.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jvdelisle@charter.net Received: from [192.168.1.9] ([96.41.221.129]) by cmsmtp with ESMTPA id RlChldXERd7s7RlCilvSjT; Thu, 01 Apr 2021 00:28:56 +0000 Authentication-Results: charter.net; none X-Authority-Analysis: v=2.3 cv=Db+jVclW c=1 sm=1 tr=0 a=07pILqX15KmGv9ZXTMmBNA==:117 a=07pILqX15KmGv9ZXTMmBNA==:17 a=IkcTkHD0fZMA:10 a=Jv2XNQ_eICGAv4-hx2UA:9 a=QEXdDO2ut3YA:10 Subject: Re: [PATCH] PR fortran/99840 - [8/9/10/11 Regression] ICE in gfc_simplify_matmul, at fortran/simplify.c:4777 To: Harald Anlauf , fortran , gcc-patches References: From: Jerry DeLisle Message-ID: <9fa9af56-f214-26d7-9b4e-b3759f2a4ee6@charter.net> Date: Wed, 31 Mar 2021 17:28:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-CMAE-Envelope: MS4wfE3gocoYRje6U53L2B8yFm+IzzTaPvnvq+PMTDkNCBp/tPGkzzp8zb4I4lXulUzoLCsd5Rf31zllq95+DPpld0cictEU/g3UemXinlSgPJAuXCoL1+vx cZfAi/WIHuYA2T0mYettkGUW/syM1j5aiogD1KN47Y8a52jBoyKQyPb/wMrgLQdnPfPINt/J4lbOiIjSno05jFNdsS8k1Q8PUeQ7CRU8md9PcmM+9LHblCyC X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 00:28:58 -0000 Yes OK for trunk and affected branches. Thanks, Jerry On 3/31/21 2:08 PM, Harald Anlauf via Fortran wrote: > Dear all, > > the simplification of the TRANSPOSE of a zero-sized array would lead to > an ICE if the result was used in a subsequent simplification of a MATMUL. > The reason was the lack of the proper initialization of the shape, which > is mpz_t. Use mpz_init_set instead of mpz_set. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Since this is a regression, backport to all affected branches? > > Thanks, > Harald > > > PR fortran/99840 - ICE in gfc_simplify_matmul, at fortran/simplify.c:4777 > > The simplification of the transposition of a constant array shall properly > initialize and set the shape of the result. > > gcc/fortran/ChangeLog: > > PR fortran/99840 > * simplify.c (gfc_simplify_transpose): Properly initialize > resulting shape. > > gcc/testsuite/ChangeLog: > > PR fortran/99840 > * gfortran.dg/transpose_5.f90: New test. >