public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>,
	Manfred Schwarb <manfred99@gmx.ch>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR87477 - [meta-bug] [F03] issues concerning the ASSOCIATE statement
Date: Fri, 7 Apr 2023 11:40:22 +0200	[thread overview]
Message-ID: <06e9fe56-4314-3392-389c-57ffd74844ab@gmx.de> (raw)
In-Reply-To: <CAGkQGi+wByOR0owHMzMyAjb9KUMENkf=_Z-p23KgxC8OUoWy+A@mail.gmail.com>

Hi Paul,

On 4/7/23 09:02, Paul Richard Thomas via Gcc-patches wrote:
> Hi All,
>
> Please find attached the patch to fix the dg directives and remove a lot of
> trailing white space.
>
> Unless there are any objections, I will commit as obvious over the weekend.

this is OK.

Thanks for the patch!

Harald

> Cheers
>
> Paul
>
> Fortran: Fix dg directives and remove trailing whitespaces in testsuite
>
> 2023-04-07  Paul Thomas  <pault@gcc.gnu.org>
>
> * gfortran.dg/c-interop/allocatable-optional-pointer.f90 : Fix
> dg directive and remove trailing whitespace.
> * gfortran.dg/c-interop/c407a-1.f90 : ditto
> * gfortran.dg/c-interop/c407b-1.f90 : ditto
> * gfortran.dg/c-interop/c407b-2.f90 : ditto
> * gfortran.dg/c-interop/c407c-1.f90 : ditto
> * gfortran.dg/c-interop/c535a-1.f90 : ditto
> * gfortran.dg/c-interop/c535a-2.f90 : ditto
> * gfortran.dg/c-interop/c535b-1.f90 : ditto
> * gfortran.dg/c-interop/c535b-2.f90 : ditto
> * gfortran.dg/c-interop/c535b-3.f90 : ditto
> * gfortran.dg/c-interop/c535c-1.f90 : ditto
> * gfortran.dg/c-interop/c535c-2.f90 : ditto
> * gfortran.dg/c-interop/deferred-character-1.f90 : ditto
> * gfortran.dg/c-interop/removed-restrictions-1.f90 : ditto
> * gfortran.dg/c-interop/removed-restrictions-2.f90 : ditto
> * gfortran.dg/c-interop/removed-restrictions-4.f90 : ditto
> * gfortran.dg/c-interop/tkr.f90 : ditto
> * gfortran.dg/class_result_10.f90 : ditto
> * gfortran.dg/dtio_35.f90 : ditto
> * gfortran.dg/goacc/array-with-dt-2.f90 : ditto
> * gfortran.dg/gomp/affinity-clause-1.f90 : ditto
> * gfortran.dg/pr103258.f90 : ditto
> * gfortran.dg/pr59107.f90 : ditto
> * gfortran.dg/pr93835.f08 : ditto
>
>
>
> On Wed, 29 Mar 2023 at 09:53, Paul Richard Thomas <
> paul.richard.thomas@gmail.com> wrote:
>
>> 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 <manfred99@gmx.ch> 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\\\[\\(.* <?i>? \\+ -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  <pault@gcc.gnu.org>
>>>>
>>>> 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
>>
>
>


WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [Patch, fortran] PR87477 - [meta-bug] [F03] issues concerning the ASSOCIATE statement
Date: Fri, 7 Apr 2023 11:40:22 +0200	[thread overview]
Message-ID: <06e9fe56-4314-3392-389c-57ffd74844ab@gmx.de> (raw)
Message-ID: <20230407094022.MlV_-4_6gMKKpDcfZiLDsPvNReTopH7tPM1QpDQ0roE@z> (raw)
In-Reply-To: <CAGkQGi+wByOR0owHMzMyAjb9KUMENkf=_Z-p23KgxC8OUoWy+A@mail.gmail.com>

Hi Paul,

On 4/7/23 09:02, Paul Richard Thomas via Gcc-patches wrote:
> Hi All,
> 
> Please find attached the patch to fix the dg directives and remove a lot of
> trailing white space.
> 
> Unless there are any objections, I will commit as obvious over the weekend.

this is OK.

Thanks for the patch!

Harald

> Cheers
> 
> Paul
> 
> Fortran: Fix dg directives and remove trailing whitespaces in testsuite
> 
> 2023-04-07  Paul Thomas  <pault@gcc.gnu.org>
> 
> * gfortran.dg/c-interop/allocatable-optional-pointer.f90 : Fix
> dg directive and remove trailing whitespace.
> * gfortran.dg/c-interop/c407a-1.f90 : ditto
> * gfortran.dg/c-interop/c407b-1.f90 : ditto
> * gfortran.dg/c-interop/c407b-2.f90 : ditto
> * gfortran.dg/c-interop/c407c-1.f90 : ditto
> * gfortran.dg/c-interop/c535a-1.f90 : ditto
> * gfortran.dg/c-interop/c535a-2.f90 : ditto
> * gfortran.dg/c-interop/c535b-1.f90 : ditto
> * gfortran.dg/c-interop/c535b-2.f90 : ditto
> * gfortran.dg/c-interop/c535b-3.f90 : ditto
> * gfortran.dg/c-interop/c535c-1.f90 : ditto
> * gfortran.dg/c-interop/c535c-2.f90 : ditto
> * gfortran.dg/c-interop/deferred-character-1.f90 : ditto
> * gfortran.dg/c-interop/removed-restrictions-1.f90 : ditto
> * gfortran.dg/c-interop/removed-restrictions-2.f90 : ditto
> * gfortran.dg/c-interop/removed-restrictions-4.f90 : ditto
> * gfortran.dg/c-interop/tkr.f90 : ditto
> * gfortran.dg/class_result_10.f90 : ditto
> * gfortran.dg/dtio_35.f90 : ditto
> * gfortran.dg/goacc/array-with-dt-2.f90 : ditto
> * gfortran.dg/gomp/affinity-clause-1.f90 : ditto
> * gfortran.dg/pr103258.f90 : ditto
> * gfortran.dg/pr59107.f90 : ditto
> * gfortran.dg/pr93835.f08 : ditto
> 
> 
> 
> On Wed, 29 Mar 2023 at 09:53, Paul Richard Thomas <
> paul.richard.thomas@gmail.com> wrote:
> 
>> 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 <manfred99@gmx.ch> 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\\\[\\(.* <?i>? \\+ -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  <pault@gcc.gnu.org>
>>>>
>>>> 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
>>
> 
> 



  reply	other threads:[~2023-04-07  9:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 21:04 Paul Richard Thomas
2023-03-29  8:24 ` Manfred Schwarb
2023-03-29  8:53   ` Paul Richard Thomas
2023-04-07  7:02     ` Paul Richard Thomas
2023-04-07  9:40       ` Harald Anlauf [this message]
2023-04-07  9:40         ` Harald Anlauf
2023-04-07  7:07 ` Ping! " Paul Richard Thomas
2023-04-07  9:41   ` Harald Anlauf
2023-04-07  9:41     ` Harald Anlauf
2023-04-07 13:53     ` Paul Richard Thomas
2023-04-07 19:28       ` Harald Anlauf
2023-04-07 19:28         ` Harald Anlauf
2023-04-07 21:35         ` Paul Richard Thomas
2023-04-07 21:38           ` Paul Richard Thomas
2023-04-08 13:56           ` Harald Anlauf
2023-04-08 13:56             ` Harald Anlauf
2023-06-01 15:20 Paul Richard Thomas
2023-06-01 17:58 ` Mikael Morin
2023-06-02  7:46   ` Paul Richard Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06e9fe56-4314-3392-389c-57ffd74844ab@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=manfred99@gmx.ch \
    --cc=paul.richard.thomas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).