This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] Support allocatable *scalar* coarrays


On Monday 11 July 2011 09:49:20 Tobias Burnus wrote:
> On 07/10/2011 09:56 PM, Tobias Burnus wrote:
> > This patch implemented the trans*.c part of allocatable scalar
> > coarrays; contrary to noncoarray allocatable scalars, they have
> > cobounds and thus use an array descriptor.
> 
> I found a test case (part of Reinhold Bader's fortran_tests), which gave
> an ICE: Allocatable scalar coarrays with SAVE.
> 
> I have fixed that (trans-decl.c) and added a test.
> 
> > The attached patch was build and regtested on x86-64-linux.
> > OK for the trunk?
> 
> Tobias

Hello, 

let me understand one thing about coarray scalars: despite their name, they 
are arrays, right?
Then when you do in gfc_conv_array_ref:

+      if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (se->expr)))
+       se->expr = build_fold_indirect_ref (gfc_conv_array_data (se->expr));
[...]
       return;

you are returning scalar[1] instead of scalar (== scalar[this_image()]) or 
scalar[whatever_image_selector], aren't you?


Sorry for the delay; it seems that the more it goes, the more you are the only 
one who can maintain coarray stuff. :-(

Mikael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]