On Fri, Feb 18, 2022 at 11:13:16PM +0000, Hafiz Abid Qadeer wrote:
> An allocate clause in target region must specify an allocator
> unless the compilation unit has requires construct with
> dynamic_allocators clause.  Current implementation of the allocate
> clause did not check for this restriction. This patch fills that
> gap.
> 
> gcc/ChangeLog:
> 
>       * omp-low.cc (omp_maybe_offloaded_ctx): New prototype.
>       (scan_sharing_clauses):  Check a restriction on allocate clause.
> 
> gcc/testsuite/ChangeLog:
> 
>       * c-c++-common/gomp/allocate-2.c: Add tests.
>       * c-c++-common/gomp/allocate-8.c: New test.
>       * gfortran.dg/gomp/allocate-3.f90: Add tests.
>       * gcc.dg/gomp/pr104517.c: Update.

I think it has even stronger requirement, that the allocator is present
and is present in uses_allocators clause.

But we don't parse uses_allocators, so this is a good step forward.

Ok.

        Jakub

Reply via email to