This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, Patch, pr65795, v1] Segfault (invalid write) for ALLOCATE statement involving COARRAYS
- From: Damian Rouson <damian at sourceryinstitute dot org>
- To: Andre Vehreschild <vehre at gmx dot de>
- Cc: GCC-Patches-ML <gcc-patches at gcc dot gnu dot org>, GCC-Fortran-ML <fortran at gcc dot gnu dot org>
- Date: Sun, 3 Apr 2016 15:22:59 -0700
- Subject: Re: [Fortran, Patch, pr65795, v1] Segfault (invalid write) for ALLOCATE statement involving COARRAYS
- Authentication-results: sourceware.org; auth=none
- References: <20160403153547 dot 5b7ff61a at vepi2> <CB075FE8-09BB-4F8D-9FC4-08CAEE012287 at sourceryinstitute dot org> <B6CAB5C1-958B-48F1-97DD-F48BC24D093F at gmx dot de>
> On Apr 3, 2016, at 3:04 PM, Andre Vehreschild <vehre@gmx.de> wrote:
>
> Hi Damian,
>
> To say it quite bluntly, I don't know. I took care of the ICE only, but I don't have a deeper understanding of the coarray usage, therefore I can't answer your question.
Hi Andre,
No problem. Thanks for the quick reply.
> What should the meaning of the line in question be? Doesn't it overwrite the allocated reference with the one of image 1? And how would you expect to continue from there?
Itâs just a check to see what the compiler will do. It could be thought of as a poorly written broadcast. To be a correct broadcast, it would require a âsync allâ just after the first assignment. Then the second assignment would give every image a copy of the caf component that was on image 1, which has an x component with the value 1. Even with this correction, it would of course exhibit poor scaling due to network contention and it would be better to call co_broadcast.
I just wrote it to see if there had been additional progress toward supporting derived type coarrays with allocatable or pointer components. If so, that will be of great interest to the users of OpenCoarrays and I would announce it on the OpenCoarrays mailing list.
Damian