[Ping^2, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST
Tue Jun 22 07:40:18 GMT 2021
thanks for the review.
To the questions:
- I added a test only for -fcoarray=single because in the library case the
optional stat is just propagated to the library, which is already tested a
lot of times and which needs to handle the optional stat in any case. So an
error there would have been detected in one of the earlier tests. I did not
want to add unnecessary test overhead given that the tests already run for a
- I did not add tests for the other CO_* routines, i.e. CO_MIN, CO_MAX,
CO_REDUCE or CO_SUM, that are also handled by this routine, because I believe
that showing that the fix works for CO_BROADCAST shows that the others work,
too. Because the four others do not have any special handling in their
implementation in trans_intrinsic. Or do you mean other coarray-routines
besides the five handled by conv_co_collective()?
If it is ok for you, I would apply the patch as is, or do you see a reason to
add more tests?
On Mon, 21 Jun 2021 14:30:21 +0200
Tobias Burnus <firstname.lastname@example.org> wrote:
> Any reason that you did not put it under
> such that it is also run with -fcoarray=lib (-lcaf_single)?
> I know that the issue only exists for single, but it also makes
> sense to check that libcaf_single works ....
> In that sense, I wonder whether also the other CO_* should be
> checked in the testsuite as they are handled differently in
> libcaf_... (but identical with -fcoarray=single).
> Except for those two nits, it LGTM. Thanks!
> PS: The function is used by
> case GFC_ISYM_CO_BROADCAST:
> case GFC_ISYM_CO_MIN:
> case GFC_ISYM_CO_MAX:
> case GFC_ISYM_CO_REDUCE:
> case GFC_ISYM_CO_SUM:
> and, with -fcoarray=single, errmsg is not touched
> as stat is (unconditionally) 0 (success)..
> On 19.06.21 13:23, Andre Vehreschild via Fortran wrote:
> > PING!
> > On Fri, 4 Jun 2021 18:05:18 +0200
> > Andre Vehreschild <email@example.com> wrote:
> >> Ping!
> >> On Fri, 21 May 2021 15:33:11 +0200
> >> Andre Vehreschild <firstname.lastname@example.org> wrote:
> >>> Hi,
> >>> the attached patch fixes an issue when calling CO_BROADCAST in
> >>> -fcoarray=single mode, where the optional but non-present (in the calling
> >>> scope) stat variable was assigned to before checking for it being not
> >>> present.
> >>> Regtests fine on x86-64-linux/f33. Ok for trunk?
> >>> Regards,
> >>> Andre
> > --
> > Andre Vehreschild * Email: vehre ad gmx dot de
> Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München
> Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank
Andre Vehreschild * Email: vehre ad gmx dot de
More information about the Gcc-patches