This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [accaf, fortran, 4/4] Allocatable components support in derived typed coarrays
- From: Andre Vehreschild <vehre at gmx dot de>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>, "fortran\@gcc.gnu.org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Damian Rouson <damian at sourceryinstitute dot org>
- Date: Tue, 20 Sep 2016 14:41:12 +0200
- Subject: Re: [accaf, fortran, 4/4] Allocatable components support in derived typed coarrays
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiJuhjwQThepLuJ8z525AGKY5Mm6J82VWFR2Ki0yY3We9Q@mail.gmail.com> <20160919154553.46ec6e2e@vepi2> <mvm60pq7oih.fsf@hawking.suse.de>
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
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (Revision 240261)
+++ gcc/testsuite/ChangeLog (Arbeitskopie)
@@ -1,3 +1,8 @@
+2016-09-20 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ * gfortran.dg/coarray_allocate_7.f08: Using + instead of fixed number
+ of digits expected.
+
2016-09-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/77646
Index: gcc/testsuite/gfortran.dg/coarray_allocate_7.f08
===================================================================
--- gcc/testsuite/gfortran.dg/coarray_allocate_7.f08 (Revision 240261)
+++ gcc/testsuite/gfortran.dg/coarray_allocate_7.f08 (Arbeitskopie)
@@ -22,6 +22,6 @@
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_register \\(D.\[0-9\]+, 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" } }