Re: [Patch] OpenMP: Accept argument to depobj's destroy clause

2023-11-23 Thread Jakub Jelinek
On Thu, Nov 23, 2023 at 04:59:16PM +0100, Tobias Burnus wrote: > > There is also OEP_LEXICOGRAPHIC which could be used in addition to that. > > The question is if we want to consider say > > #pragma depobj (a[++i]) destroy (a[++i]) > > as same or different (similarly a[foo ()] in both cases). > >

Re: [Patch] OpenMP: Accept argument to depobj's destroy clause

2023-11-23 Thread Tobias Burnus
Hi Jakub, On 23.11.23 16:32, Jakub Jelinek wrote: On Thu, Nov 23, 2023 at 04:21:50PM +0100, Tobias Burnus wrote: @@ -21663,7 +21666,25 @@ c_parser_omp_depobj (c_parser *parser) + else if (depobj != error_mark_node + && !operand_equal_p (destobj, depobj, +

Re: [Patch] OpenMP: Accept argument to depobj's destroy clause

2023-11-23 Thread Jakub Jelinek
On Thu, Nov 23, 2023 at 04:21:50PM +0100, Tobias Burnus wrote: > @@ -21663,7 +21666,25 @@ c_parser_omp_depobj (c_parser *parser) > clause = error_mark_node; > } >else if (!strcmp ("destroy", p)) > - kind = OMP_CLAUSE_DEPEND_LAST; > + { > + matching_parens c_par

Re: [Patch] OpenMP: Accept argument to depobj's destroy clause

2023-11-23 Thread Tobias Burnus
Hi Jakub, On 23.11.23 15:32, Jakub Jelinek wrote: On Thu, Nov 23, 2023 at 03:21:41PM +0100, Tobias Burnus wrote: I stumbled over this trivial omission which blocks some testcases. I am not sure whether I have solved the is-same-expr most elegantly, Answer: I didn't - as expected. + if (DECL_U

Re: [Patch] OpenMP: Accept argument to depobj's destroy clause

2023-11-23 Thread Jakub Jelinek
On Thu, Nov 23, 2023 at 03:21:41PM +0100, Tobias Burnus wrote: > I stumbled over this trivial omission which blocks some testcases. > > I am not sure whether I have solved the is-same-expr most elegantly, > but I did loosely follow the duplicated-entry check for 'map'. As that's > a restriction to

[Patch] OpenMP: Accept argument to depobj's destroy clause

2023-11-23 Thread Tobias Burnus
I stumbled over this trivial omission which blocks some testcases. I am not sure whether I have solved the is-same-expr most elegantly, but I did loosely follow the duplicated-entry check for 'map'. As that's a restriction to the user, we don't have to catch all and I hope the code catches the mo