* [Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly
@ 2020-08-18 17:04 Andre Vehreschild
2020-08-18 17:14 ` Tobias Burnus
0 siblings, 1 reply; 4+ messages in thread
From: Andre Vehreschild @ 2020-08-18 17:04 UTC (permalink / raw)
To: GCC-Fortran-ML, GCC-Patches-ML
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
Hi all,
attached patch fixes an obvious typo in the routine gathering arguments for
co_broadcast(). See pr94958 for a detailed analysis, please.
Regtests ok on FC31/x86_64. Will commit as obvious on Thursday, if no one
objects.
Regards,
Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de
[-- Attachment #2: pr94958.clog --]
[-- Type: text/plain, Size: 146 bytes --]
gcc/fortran/ChangeLog:
2020-08-18 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/94958
* trans-array.c (gfc_bcast_alloc_comp): Fix typo.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: pr94958.patch --]
[-- Type: text/x-patch, Size: 442 bytes --]
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)
{
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly
2020-08-18 17:04 [Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly Andre Vehreschild
@ 2020-08-18 17:14 ` Tobias Burnus
2020-08-18 17:27 ` Andre Vehreschild
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Burnus @ 2020-08-18 17:14 UTC (permalink / raw)
To: Andre Vehreschild, GCC-Fortran-ML, GCC-Patches-ML
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?
You could also consider adding a libcaf_single test case,
given that you wrote one (see PR)...
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly
2020-08-18 17:14 ` Tobias Burnus
@ 2020-08-18 17:27 ` Andre Vehreschild
2020-08-20 15:53 ` Andre Vehreschild
0 siblings, 1 reply; 4+ messages in thread
From: Andre Vehreschild @ 2020-08-18 17:27 UTC (permalink / raw)
To: Tobias Burnus; +Cc: GCC-Fortran-ML, GCC-Patches-ML
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly
2020-08-18 17:27 ` Andre Vehreschild
@ 2020-08-20 15:53 ` Andre Vehreschild
0 siblings, 0 replies; 4+ messages in thread
From: Andre Vehreschild @ 2020-08-20 15:53 UTC (permalink / raw)
To: GCC-Patches-ML, GCC-Fortran-ML
Hi,
commited with the input by Tobias applied. The full commit message now is:
Fix obvious typo were errmsg_len was assigned to errmsg.
gcc/fortran/ChangeLog:
2020-08-20 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/94958
* trans-array.c (gfc_bcast_alloc_comp): Use the correct variable.
Regards,
Andre
On Tue, 18 Aug 2020 19:27:50 +0200
Andre Vehreschild <vehre@gmx.de> wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-20 15:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18 17:04 [Patch, fortran, coarray] Fix obvious typo in co_broadcast's argument assembly Andre Vehreschild
2020-08-18 17:14 ` Tobias Burnus
2020-08-18 17:27 ` Andre Vehreschild
2020-08-20 15:53 ` Andre Vehreschild
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).