Hi David, Jakub, Tobias, gfortran/OMP developers! This is about how an OpenACC (but also OpenMP 'target', I suppose) data clause for Fortran 'allocatable' with array descriptor appears in the 'original' dump.
On 2020-07-18T16:02:12+0000, David Edelsohn <d...@gcc.gnu.org> wrote: > https://gcc.gnu.org/g:60c1baebbaa62eb588ec4ab263de3b88283fdbee > > commit r11-2209-g60c1baebbaa62eb588ec4ab263de3b88283fdbee > Author: David Edelsohn <dje....@gmail.com> > Date: Fri Jul 17 19:38:35 2020 -0400 > > testsuite: fix goacc/finalize-1.f "original" regex for 32 bits. (No patch submission email for that one?) > The "bias" portion of the regex for "original" expects > > bias: (integer(kind=<N>) parm.0.data - (integer(kind=<N>)) del_f_p.data > > (or cpo_f_p.data) > > on 32 bit platforms, the dump file can show (signed int) instead of > (integer(kind=8)... . Hmm, interesting. What system/configuration is that on? And, I'm not yet understanding how that'd apply to 32-bit systems specifically? One step back, gfortran/OMP developers (Jakiub, Tobias?): is this expected/alright? Isn't there sometime generally wrong with how the 'bias' gets calculated, or am I now confused? Given the testcase's: INTEGER (1), DIMENSION (:), ALLOCATABLE :: del_f_p' ... etc., why is the 'bias' calculation for OpenACC 'delete(del_f_p(2:5))' displaying/calculated as an non-pointer integer type: map(alloc:[...] [pointer assign, bias: (integer(kind=4)) parm.0.data - (integer(kind=4)) del_f_p.data]) ..., or '(signed int) del_f_p.data' etc. as David ran into? Shouldn't that refer to 'del_f_p.data' etc. via a pointer type, as've got in: map(alloc:(integer(kind=1)[0:] * restrict) del_f_p.data ..., for example? Grüße Thomas > This patch adjusts the regex to allow any content > containing the word int between the parentheses. > > 2020-07-18 David Edelsohn <dje....@gmail.com> > > gcc/testsuite/ChangeLog > > * gfortran.dg/goacc/finalize-1.f: Adjust regex for 32 bits. > > Diff: > --- > gcc/testsuite/gfortran.dg/goacc/finalize-1.f | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/testsuite/gfortran.dg/goacc/finalize-1.f > b/gcc/testsuite/gfortran.dg/goacc/finalize-1.f > index 266ead35192..a7788580819 100644 > --- a/gcc/testsuite/gfortran.dg/goacc/finalize-1.f > +++ b/gcc/testsuite/gfortran.dg/goacc/finalize-1.f > @@ -20,7 +20,7 @@ > ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target > oacc_enter_exit_data map\\(delete:del_f \\\[len: \[0-9\]+\\\]\\) finalize$" 1 > "gimple" } } > > !$ACC EXIT DATA FINALIZE DELETE (del_f_p(2:5)) > -! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data > map\\(release:\\*\\(c_char \\*\\) parm\\.0\\.data \\\[len: \[^\\\]\]+\\\]\\) > map\\(to:del_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) > map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) del_f_p\\.data > \\\[pointer assign, bias: \\(integer\\(kind=.\\)\\) parm\\.0\\.data - > \\(integer\\(kind=.\\)\\) del_f_p\\.data\\\]\\) finalize;$" 1 "original" } } > +! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data > map\\(release:\\*\\(c_char \\*\\) parm\\.0\\.data \\\[len: \[^\\\]\]+\\\]\\) > map\\(to:del_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) > map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) del_f_p\\.data > \\\[pointer assign, bias: \\(.*int.*\\) parm\\.0\\.data - \\(.*int.*\\) > del_f_p\\.data\\\]\\) finalize;$" 1 "original" } } > ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target > oacc_enter_exit_data map\\(delete:MEM\\\[\\(c_char \\*\\)\[^\\\]\]+\\\] > \\\[len: \[^\\\]\]+\\\]\\) map\\(to:del_f_p \\\[pointer set, len: > \[0-9\]+\\\]\\) map\\(alloc:del_f_p\\.data \\\[pointer assign, bias: > \[^\\\]\]+\\\]\\) finalize$" 1 "gimple" } } > > !$ACC EXIT DATA COPYOUT (cpo_r) > @@ -32,6 +32,6 @@ > ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target > oacc_enter_exit_data map\\(force_from:cpo_f \\\[len: \[0-9\]+\\\]\\) > finalize$" 1 "gimple" } } > > !$ACC EXIT DATA COPYOUT (cpo_f_p(4:10)) FINALIZE > -! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data > map\\(from:\\*\\(c_char \\*\\) parm\\.1\\.data \\\[len: \[^\\\]\]+\\\]\\) > map\\(to:cpo_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) > map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) cpo_f_p\\.data > \\\[pointer assign, bias: \\(integer\\(kind=.\\)\\) parm\\.1\\.data - > \\(integer\\(kind=.\\)\\) cpo_f_p\\.data\\\]\\) finalize;$" 1 "original" } } > +! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data > map\\(from:\\*\\(c_char \\*\\) parm\\.1\\.data \\\[len: \[^\\\]\]+\\\]\\) > map\\(to:cpo_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) > map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) cpo_f_p\\.data > \\\[pointer assign, bias: \\(.*int.*\\) parm\\.1\\.data - \\(.*int.*\\) > cpo_f_p\\.data\\\]\\) finalize;$" 1 "original" } } > ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target > oacc_enter_exit_data map\\(force_from:MEM\\\[\\(c_char \\*\\)\[^\\\]\]+\\\] > \\\[len: \[^\\\]\]+\\\]\\) map\\(to:cpo_f_p \\\[pointer set, len: > \[0-9\]+\\\]\\) map\\(alloc:cpo_f_p\\.data \\\[pointer assign, bias: > \[^\\\]\]+\\\]\\) finalize$" 1 "gimple" } } > END SUBROUTINE f ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter