[Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly
Andre Vehreschild
vehre@gmx.de
Tue Aug 18 17:27:50 GMT 2020
Hi Tobias,
On Tue, 18 Aug 2020 19:14:30 +0200
Tobias Burnus <tobias@codesourcery.com> wrote:
> On 8/18/20 7:04 PM, Andre Vehreschild wrote:
>
> > attached patch fixes an obvious typo in the routine gathering arguments for
> > co_broadcast(). See pr94958 for a detailed analysis, please.
>
> LGTM – except that I do not like the ChangeLog entry.
>
> It sounds like a mispelling in terms of a comment or
> error message. How about "Using the correct variable."
> – or something like that?
That's a good idea. Will use that.
> You could also consider adding a libcaf_single test case,
> given that you wrote one (see PR)...
Well, the test case in the PR does not test the issue, only with additional
modifications of trans-array one may see an impact in the pseudo code.
Alternatively one has to do a lot more of code generation aggregating the
results of the broadcasts of the different components. Given this is not
defined in the standard, I am not sure what to do here. And therefore just
wanted to correct the "miss-assignment" allowing future correct code generation.
Regards,
Andre
>
> Thanks for the patch!
>
> Tobias
>
> > gcc/fortran/ChangeLog:
> >
> > 2020-08-18 Andre Vehreschild<vehre@gcc.gnu.org>
> >
> > PR fortran/94958
> > * trans-array.c (gfc_bcast_alloc_comp): Fix typo.
> >
> >
> > pr94958.patch
> >
> > diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
> > index 7a1b2fc74c9..73a45cd2dcf 100644
> > --- a/gcc/fortran/trans-array.c
> > +++ b/gcc/fortran/trans-array.c
> > @@ -9732,7 +9732,7 @@ gfc_bcast_alloc_comp (gfc_symbol *derived, gfc_expr
> > *expr, int rank, args.image_index = image_index;
> > args.stat = stat;
> > args.errmsg = errmsg;
> > - args.errmsg = errmsg_len;
> > + args.errmsg_len = errmsg_len;
> >
> > if (rank == 0)
> > {
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
> Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung,
> Alexander Walter
--
Andre Vehreschild * Email: vehre ad gmx dot de
More information about the Gcc-patches
mailing list