From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id DA99B3857005 for ; Tue, 9 May 2023 18:29:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA99B3857005 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pwS5h-00093d-WC for gcc-patches@gcc.gnu.org; Tue, 09 May 2023 20:29:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch, fortran] PR103716 - [10/11/12/13/14 Regression] ICE in gimplify_expr, at gimplify.c:15964 Date: Tue, 9 May 2023 20:29:30 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US In-Reply-To: Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_NUMSUBJECT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20230509182930.hTHHV9z1rm8T63rHaDYc3K8Phsrqhv7LNgMR2E8pjxM@z> Hi Paul, On 5/9/23 18:00, Paul Richard Thomas via Gcc-patches wrote: > Hi All, > > This problem caused the gimplifier failure because the reference chain > ending in an inquiry_len still retained a full array reference. This had > already been corrected for deferred character lengths but the fix extends > this to all characters without a length expression and integer expressions, > which is the correct type of course, that retain a full array_spec. The > nullification of the se->string length in conv_inquiry is a > belts-and-braces measure to stop it from winding up as a hidden argument in > procedure calls. > > OK for trunk and, after a decent delay, backporting? ENOTESTCASE. Nevertheless the patch LGTM and is also OK for backporting. Thanks for fixing this! Harald > Cheers > > Paul > > Fortran: Fix assumed length chars and len inquiry [PR103716] > > 2023-05-09 Paul Thomas > > gcc/fortran > PR fortran/103716 > * resolve.cc (gfc_resolve_ref): Conversion of array_ref into an > element should be done for all characters without a len expr, > not just deferred lens, and for integer expressions. > * trans-expr.cc (conv_inquiry): For len and kind inquiry refs, > set the se string_length to NULL_TREE. > > gcc/testsuite/ > PR fortran/103716 > * gfortran.dg/pr103716 : New test.