From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id 68CD7385800A; Wed, 29 Mar 2023 08:53:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68CD7385800A 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-pj1-x1031.google.com with SMTP id l7so13419823pjg.5; Wed, 29 Mar 2023 01:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680079998; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rNr+v49+eMa21C14NaNIV64FuDMxU1uBzbhs96+ccv8=; b=ZFUBThuLRRQebfIGvEMa3TTZna/vUIZhMHAmesQNTgrH0qfaTRW1T30pRj8/pkCzGP gmCkwJ7wx19PsQ4r+amkStnov+0ev9OLmBh5vqL5Te+TNtya8YQCab9Z48+ISyZIP6xH +DqfdovTPxAj5zglCPxenXhUNgdFt+YiNh+DKQm8PoHF2MRz88sMmdLqizynEdnyU63i 0pF3XK2KKTiWdTJgo+UdNCa02Ztap1NqgrF3ahS8ElYm7+65hPSYzEDCe/W8Va/2Je4g YYP+IaPM9wgDDNp6hfzgdXrKorYJz3mvgx1P//GTvAK3WQo1wfpLSLaCq15sveNxy7a7 KzKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680079998; 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=rNr+v49+eMa21C14NaNIV64FuDMxU1uBzbhs96+ccv8=; b=YtKWvGpSuc8LinGm/P5Hlu/snC7Ho73EnlW54P8ukG9E2nrRj/33Vb5gwrFZIKEJ+V Xql+5jo3H6BrAOlleiveWpJpU08TXMBAmPWhz/uP/s4GkUZRSP4i3gA3IkeKWQzMq+aH bnwF2LLfNv/v07vmyPlyARJPQ8NKJx19wl9sS5vAd6diK3po2jUBxJbXBOM6r7s1eJyO g7WWEWXFfpJDgc4a8OeZJIiw+FJAx33Xwr5H9B3Vzp5cyrFszSHJb7tRLAPceGfxdXG0 UM5L4/BStRPAVLcYkpvEUAJw3zj6ovBNK7dsp6fCDsZ7078FpwoQSTYyyXHnj7i7yo7Q /6YQ== X-Gm-Message-State: AAQBX9dekgymWQoD/Igh3HqOGfxSKA68UeFlx9plz/FD+2d6yqCi+jdZ BxSqbPFxGnb9uunKm/dR8zDOAmPTgtqo6DzCUFQ= X-Google-Smtp-Source: AKy350ZLY7ofbVQLBRe3DHozFkJUlOI3ljIQwDq8zssDKiTeUgX0w5wPNJVqGgdP6i02+P4g2hMEs7XhV7BzqC/LEU4= X-Received: by 2002:a17:902:dace:b0:1a0:41ea:b9ba with SMTP id q14-20020a170902dace00b001a041eab9bamr7136512plx.8.1680079998198; Wed, 29 Mar 2023 01:53:18 -0700 (PDT) MIME-Version: 1.0 References: <0a9997a2-819e-40bc-4623-a4dbd3507a32@gmx.ch> In-Reply-To: <0a9997a2-819e-40bc-4623-a4dbd3507a32@gmx.ch> From: Paul Richard Thomas Date: Wed, 29 Mar 2023 09:53:07 +0100 Message-ID: Subject: Re: [Patch, fortran] PR87477 - [meta-bug] [F03] issues concerning the ASSOCIATE statement To: Manfred Schwarb Cc: gcc-patches , "fortran@gcc.gnu.org" Content-Type: multipart/alternative; boundary="0000000000007ca75505f8061b79" X-Spam-Status: No, score=-1.4 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: --0000000000007ca75505f8061b79 Content-Type: text/plain; charset="UTF-8" Hi Manfred, Indeed I do :-) Thanks for the spot. I have decided that it will be less messy if I roll all the testcases into one or, perhaps two => associate_xx.f90 Forgetting the space before the final brace seems to be rife! Cheers Paul On Wed, 29 Mar 2023 at 09:24, Manfred Schwarb wrote: > Am 28.03.23 um 23:04 schrieb Paul Richard Thomas via Fortran: > > Hi All, > > > > I have made a start on ASSOCIATE issues. Some of the low(-ish) hanging > > fruit are already fixed but I have yet to check that they a really fixed > > and to close them: > > pr102106, pr102111, pr104430, pr106048, pr85510, pr87460, pr92960 & > pr93338 > > > > The attached patch picks up those PRs involving deferred length > characters > > in one guise or another. I believe that it is all pretty straightforward. > > Structure constructors with allocatable, deferred length, character array > > components just weren't implemented and so this is the biggest part of > the > > patch. I found two other, non-associate PRs(106918 & 105205) that are > > fixed and there are probably more. > > > > The chunk in trans-io.cc is something of a kludge, which I will come back > > to. Some descriptors come through with a data pointer that looks as if it > > should be OK but > > > > I thought to submit this now to get it out of the way. The ratio of PRs > > fixed to the size of the patch warrants this. The next stage is going to > be > > rather messy and so "I might take a little while" (cross talk between > > associate and select type, in particular). > > > > Regtests OK - good for mainline? > > > > Paul, you have some "dg-do-run" and "dg-do-compile" statements in your > testcases, > could you change them into their single-minus-sign variants? > > Cheers, > Manfred > > > BTW: I just ran my script again and found the following testsuite issues > (note that outer-most > braces need to be space-padded): > > ./c-interop/removed-restrictions-1.f90:! { dg-do compile} > ./c-interop/removed-restrictions-2.f90:! { dg-do compile} > ./c-interop/removed-restrictions-3.f90:! { dg-do compile} > ./c-interop/removed-restrictions-4.f90:! { dg-do compile} > ./c-interop/tkr.f90:! { dg-do compile} > ./c-interop/c407c-1.f90:! { dg-do compile} > ./c-interop/deferred-character-1.f90:! { dg-do compile} > ./c-interop/allocatable-optional-pointer.f90:! { dg-do compile} > ./c-interop/c407a-1.f90:! { dg-do compile} > ./c-interop/c407b-1.f90:! { dg-do compile} > ./c-interop/c407b-2.f90:! { dg-do compile} > ./c-interop/c535a-1.f90:! { dg-do compile} > ./c-interop/c535a-2.f90:! { dg-do compile} > ./c-interop/c535b-1.f90:! { dg-do compile} > ./c-interop/c535b-2.f90:! { dg-do compile} > ./c-interop/c535b-3.f90:! { dg-do compile} > ./c-interop/c535c-1.f90:! { dg-do compile} > ./c-interop/c535c-2.f90:! { dg-do compile} > ./gomp/affinity-clause-1.f90:! { dg final { scan-tree-dump-times "#pragma > omp task affinity\\(iterator\\(integer\\(kind=4\\) > i=D\\.\[0-9\]+:5:1\\):b\\\[\\(.* ? \\+ -1\\\]\\) > affinity\\(iterator\\(integer\\(kind=4\\) > i=D\\.\[0-9\]+:5:1\\):d\\\[\\(\\(integer\\(kind=8\\)\\) i \\+ -1\\) \\* > 6\\\]\\)" 1 "original" } } > ./class_result_10.f90:! { dg-do run} > ./pr103258.f90:! { dg-do compile} > ./dtio_35.f90:! { dg-compile } > ./pr93835.f08:! {dg-do run } > ./pr59107.f90:! { dg-compile } > > > > > Cheers > > > > Paul > > > > Fortran: Fix some of the bugs in associate [PR87477] > > > > 2023-03-28 Paul Thomas > > > > gcc/fortran > > PR fortran/87477 > > * trans-array.cc (gfc_conv_expr_descriptor): Guard string len > > expression in condition. > > (duplicate_allocatable): Make element type more explicit with > > 'eltype'. > > * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in > > 'previous' and use if end expression in substring reference is > > null. > > (gfc_conv_string_length): Use gfc_conv_expr_descriptor if > > 'expr_flat' is an array. > > (gfc_trans_alloc_subarray_assign): If this is a deferred string > > length component, store the string length in the hidden comp. > > Update the typespec length accordingly. Generate a new type > > spec for the call to gfc_duplicate-allocatable in this case. > > * trans-io.cc (gfc_trans_transfer): Scalarize transfer of > > deferred character array components. > > > > > > gcc/testsuite/ > > PR fortran/92994 > > * gfortran.dg/finalize_51.f90 : Update an error message. > > > > PR fortran/85686 > > * gfortran.dg/pr85686.f90 : New test > > > > PR fortran/88247 > > * gfortran.dg/pr88247.f90 : New test > > > > PR fortran/91941 > > * gfortran.dg/pr91941.f90 : New test > > > > PR fortran/92779 > > * gfortran.dg/pr92779.f90 : New test > > > > PR fortran/93339 > > * gfortran.dg/pr93339.f90 : New test > > > > PR fortran/93813 > > * gfortran.dg/pr93813.f90 : New test > > > > PR fortran/100948 > > * gfortran.dg/pr100948.f90 : New test > > > > PR fortran/102106 > > * gfortran.dg/pr102106.f90 : New test > > > > PR fortran/105205 > > * gfortran.dg/pr105205.f90 : New test > > > > PR fortran/106918 > > * gfortran.dg/pr106918.f90 : New test > > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein --0000000000007ca75505f8061b79--