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 D8ABD3858284 for ; Wed, 11 Oct 2023 19:21:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8ABD3858284 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 1qqemM-0001mB-Mq for gcc-patches@gcc.gnu.org; Wed, 11 Oct 2023 21:21:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types Date: Wed, 11 Oct 2023 21:21:51 +0200 Message-ID: <563d4b18-eeff-453d-b7e4-3fff30df09e1@gmx.de> References: <9d99ec10-3dd9-4af5-b330-f839ac601165@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla Thunderbird Content-Language: en-US In-Reply-To: <9d99ec10-3dd9-4af5-b330-f839ac601165@gmx.de> Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP 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: <20231011192151.mz80D09Sp7jXedw-rA6W84JXOYFT-7NNJb6tIRrnvjo@z> Hi Paul, the patch is fine, but I forgot the mention that the testcase needs fixing: Instead of ! {dg-do compile } you'll likely want ! { dg-do run } (Note the space before the dg-command.) Cheers, Harald On 10/11/23 21:06, Harald Anlauf wrote: > Hi Paul, > > On 10/11/23 10:48, Paul Richard Thomas wrote: >> Hi All, >> >> The title line of the PR should have been changed a long time since. As >> noted in comment 5, the original problem was fixed in 10.5. >> >> This patch fixes the problem described in comments 4 and 6, where the >> hidden string length component was not being set in pointer assignment of >> character arrays. >> >> The fix regtests. OK for trunk and 13-branch? > > this is OK for both. > > I'd suggest to wait a couple of days or a week before backporting. > > Thanks for the patch! > > Harald > >> Thanks are due to Harald for bringing this to my attention. >> >> Paul >> >> Fortran: Set hidden string length for pointer components [PR67440] >> >> 2023-10-11  Paul Thomas  >> >> gcc/fortran >> PR fortran/pr67740 >> * trans-expr.cc (gfc_trans_pointer_assignment): Set the hidden >> string length component for pointer assignment to character >> pointer components. >> >> gcc/testsuite/ >> PR fortran/87477 >> * gfortran.dg/pr67740.f90: New test >> > >