On 2022/6/6 9:22 下午, Jakub Jelinek wrote:
On Mon, Jun 06, 2022 at 09:19:18PM +0800, Chung-Lin Tang wrote:
On 2022/5/31 6:02 PM, Jakub Jelinek wrote:
5) for C++, we should handle FIELD_DECLs, but it shouldn't be hard, just
look how it is handled for private too
Jakub
About private() for non-static members, is it really working right now?
Perhaps we have a bug that we should file in bugzilla and should fix.
Can you try omp parallel or omp target in the test instead?
I see it works for omp parallel/task, gimplify results:
void C::foo (struct C * const this)
{
omp_allocator_handle_t a [value-expr: ((struct C *) this)->a];
#pragma omp parallel private(a)
{
a = 0;
}
}
I'll file a bugzilla for the target construct.
That said, can we delay FIELD_DECL support for uses_allocators? (which is
target construct only)
Since it appears to be not trivial at the moment.
Thanks,
Chung-Lin
A simple test:
struct C {
omp_allocator_handle_t a;
void foo (void) {
#pragma omp target private (a)
a = (omp_allocator_handle_t) 0;
}
};
int main (void)
{
C c;
c.foo ();
return 0;
}
Jakub