[accaf, fortran, 4/4] Allocatable components support in derived typed coarrays

Andre Vehreschild vehre@gmx.de
Tue Sep 20 13:10:00 GMT 2016


Hi Andreas,

thanks for the report. I better use + there instead of the fixed number of
digits. Fixed as obvious as r240262.

Thanks again.

- Andre

On Tue, 20 Sep 2016 14:18:46 +0200
Andreas Schwab <schwab@suse.de> wrote:

> On Sep 19 2016, Andre Vehreschild <vehre@gmx.de> wrote:
> 
> > Index: gcc/testsuite/gfortran.dg/coarray_allocate_7.f08
> > ===================================================================
> > --- gcc/testsuite/gfortran.dg/coarray_allocate_7.f08	(nicht existent)
> > +++ gcc/testsuite/gfortran.dg/coarray_allocate_7.f08	(Arbeitskopie)
> > @@ -0,0 +1,27 @@
> > +! { dg-do run }
> > +! { dg-options "-fcoarray=lib -lcaf_single -fdump-tree-original" }
> > +
> > +! Contributed by Damian Rouson
> > +! Checking whether (de-)registering of coarrays works.
> > +
> > +program main
> > +
> > +  implicit none
> > +
> > +  type mytype
> > +    integer, allocatable :: indices(:)
> > +  end type
> > +
> > +  type(mytype), save :: object[*]
> > +  integer :: i,me
> > +
> > +  me=this_image() ! me is always 1 here
> > +  object%indices=[(i,i=1,me)]
> > +  if ( size(object%indices) /= 1 ) call abort()
> > +  ! therefore no array is present here and no array test needed.
> > +  if ( object%indices(1) /= 1 ) call abort()
> > +end program
> > +
> > +! { dg-final { scan-tree-dump-times "_gfortran_caf_register
> > \\(D.\[0-9\]{4}, 1, &\\(\\(struct mytype\\) \\*object\\).indices.token,
> > &\\(\\(struct mytype\\) \\*object\\).indices, 0B, 0B, 0\\);" 2
> > "original" } } +! { dg-final { scan-tree-dump-times
> > "_gfortran_caf_deregister \\(&\\(\\(struct mytype\\)
> > \\*object\\).indices.token, 0B, 0B, 0\\);" 1 "original" } }
> > +  
> 
> FAIL: gfortran.dg/coarray_allocate_7.f08   -O0   scan-tree-dump-times
> original "_gfortran_caf_register \\(D.[0-9]{4}, 1, &\\(\\(struct mytype\\)
> \\*object\\).indices.token, &\\(\\(struct mytype\\) \\*object\\).indices, 0B,
> 0B, 0\\);" 2 PASS: gfortran.dg/coarray_allocate_7.f08   -O0
> scan-tree-dump-times original "_gfortran_caf_deregister \\(&\\(\\(struct
> mytype\\) \\*object\\).indices.token, 0B, 0B, 0\\);" 1
> 
> $ grep _gfortran_caf_register coarray_allocate_7.f08.003t.original 
>   _gfortran_caf_register (28, 0, (void * *) &caf_token.0, (void *) &desc.2,
> 0B, 0B, 0); _gfortran_caf_register (D.986, 1, &((struct mytype)
> *object).indices.token, &((struct mytype) *object).indices, 0B, 0B, 0);
> _gfortran_caf_register (D.986, 1, &((struct mytype) *object).indices.token,
> &((struct mytype) *object).indices, 0B, 0B, 0);
> 
> Andreas.
> 


-- 
Andre Vehreschild * Email: vehre ad gmx dot de 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 1348 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160920/9235f0b0/attachment.bin>


More information about the Gcc-patches mailing list