Re: [Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-06-03 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 03, 2020 at 11:03:50AM +0200, Tobias Burnus wrote: > @@ -2123,6 +2124,27 @@ c_omp_predetermined_sharing (tree decl) >return OMP_CLAUSE_DEFAULT_UNSPECIFIED; > } > > +/* OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED unless OpenMP mapping attribute > + of DECL is predetermined. */ >

Re: [Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-06-03 Thread Tobias Burnus
Hi Jakub, Revised patch – changes are: * cp-gimplify.c's cxx_omp_predetermined_mapping (twice 3 lines removed as proposed) * gimplify.c's omp_notice_variable: changes how returned 'kind' is used. Namely: Pre-commit follow-up version to the 'LGTM patch': As instructed, I have removed the two-ti

Re: [Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-05-26 Thread Jakub Jelinek via Gcc-patches
On Tue, May 26, 2020 at 04:06:04PM +0200, Jakub Jelinek wrote: > On Mon, May 25, 2020 at 07:10:31PM +0200, Tobias Burnus wrote: > > +enum omp_clause_defaultmap_kind > > +cxx_omp_predetermined_mapping (tree decl) > > +{ > > + enum omp_clause_default_kind ret = cxx_omp_predetermined_sharing_1 > > (

Re: [Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-05-26 Thread Jakub Jelinek via Gcc-patches
On Mon, May 25, 2020 at 07:10:31PM +0200, Tobias Burnus wrote: > +enum omp_clause_defaultmap_kind > +cxx_omp_predetermined_mapping (tree decl) > +{ > + enum omp_clause_default_kind ret = cxx_omp_predetermined_sharing_1 (decl); > + if (ret != OMP_CLAUSE_DEFAULT_UNSPECIFIED) > +return OMP_CLAUS

Re: [Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-05-25 Thread Tobias Burnus
On 5/12/20 1:02 PM, Jakub Jelinek wrote: I think we want a new hook, the clear cases (mostly DECL_ARTIFICIAL ones, if it is really something compiler created and not something under user's control) … Attached is one version, which is somewhat minimalist; I did not check what happens with __FUN

Re: [Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-05-12 Thread Jakub Jelinek via Gcc-patches
On Fri, May 08, 2020 at 05:09:07PM +0200, Tobias Burnus wrote: > I was thinking of simply marking them as > "nflags |= GOVD_FIRSTPRIVATE" but I am not sure whether > that would always make sense, either. In any case, a > simple usage would bypass the > "implicit mapping of assumed size array" > dia

[Patch][OpenMP] Fix mapping of artificial variables (PR94874)

2020-05-08 Thread Tobias Burnus
While for data sharing (e.g. "parallel") the predetermined sharing (e.g.) for compiler-generated variables did work, this did not happen for target mapping – causing errors with "defaultmap(none)". It is not completely clear to my how to best handle this case. In most cases, the auxiliary variabl