Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-11-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 08, 2022 at 02:36:17PM +, Julian Brown wrote: > @@ -3258,6 +3273,7 @@ c_omp_address_inspector::get_origin (tree t) > || TREE_CODE (t) == SAVE_EXPR) > t = TREE_OPERAND (t, 0); >else if (TREE_CODE (t) == INDIRECT_REF > +&& TREE_TYPE (TREE_OPERAND

Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-11-02 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 02, 2022 at 12:20:11PM +, Julian Brown wrote: > > But we can't forbid lambdas inside of the map clause expressions, > > they are certainly valid in OpenMP, and IMNSHO shouldn't disallow > > statement expressions, people might not even know they use a > > statement expression, they c

Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-11-02 Thread Julian Brown
On Wed, 2 Nov 2022 12:58:37 +0100 Jakub Jelinek via Fortran wrote: > On Tue, Nov 01, 2022 at 09:50:38PM +, Julian Brown wrote: > > > I think we should figure out when we should temporarily disable > > > parser->omp_array_section_p = false; > > > and restore it afterwards to a saved value.

Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-11-02 Thread Jakub Jelinek via Gcc-patches
Hi! Thanks for working on this! On Tue, Nov 01, 2022 at 09:50:38PM +, Julian Brown wrote: > > I think we should figure out when we should temporarily disable > > parser->omp_array_section_p = false; > > and restore it afterwards to a saved value. E.g. > > cp_parser_lambda_expression seems

Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-11-01 Thread Julian Brown
Hi, On Tue, 24 May 2022 16:15:31 +0200 Jakub Jelinek via Fortran wrote: > On Fri, Mar 18, 2022 at 09:26:47AM -0700, Julian Brown wrote: > > --- a/gcc/cp/parser.cc > > +++ b/gcc/cp/parser.cc > > @@ -4266,6 +4266,9 @@ cp_parser_new (cp_lexer *lexer) > >parser->omp_declare_simd = NULL; > >p

Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-05-24 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 18, 2022 at 09:26:47AM -0700, Julian Brown wrote: > --- a/gcc/cp/parser.cc > +++ b/gcc/cp/parser.cc > @@ -4266,6 +4266,9 @@ cp_parser_new (cp_lexer *lexer) >parser->omp_declare_simd = NULL; >parser->oacc_routine = NULL; > > + /* Allow array slice in expression. */ Better /*

[PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++)

2022-03-18 Thread Julian Brown
This patch changes parsing for OpenMP map clauses in C++ to use the generic expression parser, hence adds support for parsing general lvalues (as required by OpenMP 5.0+). So far only a few new types of expression are actually supported throughout compilation (including everything in the testsuite