Hi Tobias,

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
  long time.

- 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?

Regards,
        Andre

On Mon, 21 Jun 2021 14:30:21 +0200
Tobias Burnus <tob...@codesourcery.com> wrote:

> Any reason that you did not put it under
>    gfortran.dg/coarray/
> 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!
> 
> Tobias
> 
> 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 <ve...@gmx.de> wrote:
> >  
> >> Ping!
> >>
> >> On Fri, 21 May 2021 15:33:11 +0200
> >> Andre Vehreschild <ve...@gmx.de> 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
> Thürauf


-- 
Andre Vehreschild * Email: vehre ad gmx dot de 

Reply via email to