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 <sch...@suse.de> wrote: > On Sep 19 2016, Andre Vehreschild <ve...@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 <ve...@gcc.gnu.org> + + * gfortran.dg/coarray_allocate_7.f08: Using + instead of fixed number + of digits expected. + 2016-09-20 Richard Biener <rguent...@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" } }