From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id E01B93858C01; Wed, 11 Oct 2023 22:21:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E01B93858C01 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5859e22c7daso245079a12.1; Wed, 11 Oct 2023 15:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697062884; x=1697667684; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Y50R3uiUZsp64lVJf/LnsCX8BrCStoj/1oBhTbIpqIg=; b=TqRRziaCCqsfGu8VEUwUe0/cZwyj61u0TXY85MzV4bKc0XPGl1/DgCBUazGkvjZAWV YRGC+aakcJvvipGJ64hvseFoBNwfSFvnhpFUpyHygaZCn6dKKH0ZeOQ4K66oXQJDDpew XgY6Zw2m/qni+tlSgr20Dt5Pqj3xH3mDQycpau9q4cewS3dR4ojL1isZRktAF/qoK7cg K6jYqdgf1dvdLCb3wQuc1p+u5xlvuQPpRBJZD/6LqRfgxyuajGNx/9siKr8q93M/vrmG vhdMpHz+98xDDaemzdAPfj7ePc1RxggFRnrKuJCVhgB4NLrCABl1/EmRgQdYr+5yeM5m +eBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697062884; x=1697667684; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y50R3uiUZsp64lVJf/LnsCX8BrCStoj/1oBhTbIpqIg=; b=OTvzx1gA5y31oFLjiCCqp8ARhg47fTbardrWYWrjDJbkZmHk5moBF587MMdxIsPZ55 8gUFSRMP7KKh2Rz99Hd7ccdyQk5kT+nz3oHtCCWRXF1Cmq2iNs1t1UyChlMqVVql3Mlt wiEYZ/vqRfvhYuR5GjCBR8gxxgyAW7ETnmqGEKF0mHBj7IYh1yJKKo8N3fI0MuFAKHHD uVqCtm9cUGl0TuezK/gzsdlYNelqAcgwQsEr/CqsTOH8ix9U1BE6RYVDuRutwcMHsAhF 8TaSfaMRtKwylj5rnnFtmwrVunygYyfpwnZM2qk8dzVpJDhFu7s40bA/zfZYZ2jLshkS 8U8w== X-Gm-Message-State: AOJu0YzhxrwzmjvApUbUfoBhAUcpF5GM9QaGHUmrWTxkUD1AHREd4/p7 GBgh9C0jrSA572VY7MadJcDurepV3KRg/FLU9k4= X-Google-Smtp-Source: AGHT+IEUADLMx7cY2cg0xgqInZNW/LIExBZ7w5sxk0o7v78Gmt6WT3FNi8FIEb0V7k2BrQ+23kk17TS1KnJlG+agx+Q= X-Received: by 2002:a05:6a20:7d84:b0:15c:b7ba:9137 with SMTP id v4-20020a056a207d8400b0015cb7ba9137mr26270483pzj.2.1697062883707; Wed, 11 Oct 2023 15:21:23 -0700 (PDT) MIME-Version: 1.0 References: <9d99ec10-3dd9-4af5-b330-f839ac601165@gmx.de> <563d4b18-eeff-453d-b7e4-3fff30df09e1@gmx.de> In-Reply-To: <563d4b18-eeff-453d-b7e4-3fff30df09e1@gmx.de> From: Paul Richard Thomas Date: Wed, 11 Oct 2023 23:21:12 +0100 Message-ID: Subject: Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types To: Harald Anlauf Cc: "fortran@gcc.gnu.org" , gcc-patches , Bernhard Reutner-Fischer Content-Type: multipart/alternative; boundary="00000000000058507f0607783e1b" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000058507f0607783e1b Content-Type: text/plain; charset="UTF-8" Hi Harald and Bernhard, Indeed, you are right about the space. However, the compile is intentional. This catches the fix: ! { dg-final { scan-tree-dump-times "co._data1_length = 10;" 1 "original" } } Also, it helps to get the PR number right! I was rushing to get the patch out before leaving for work and so even more error prone than usual.... Cheers Paul On Wed, 11 Oct 2023 at 20:21, Harald Anlauf wrote: > 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 > >> > > > > > > --00000000000058507f0607783e1b--