https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109999

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
<source>: In function 'test_allocate_on_device':
<source>:27:43: error: expected '#pragma omp' clause before 'uses_allocators'
   27 | #pragma omp target map(tofrom: errors, A)
uses_allocators(omp_default_mem_alloc)
      |                                           ^~~~~~~~~~~~~~~


It is because uses_allocators is not implemented yet.

If you do this:
```
int test_allocate_on_device() {
#pragma omp target hhh
  for(int i = 0;i < 10;i++);
}
```
GCC will produce a similar error message.
If you replace hhh with simd, it will work.

I suspect the error message is correct in the sense an omp clause there is
still valid too. it does not know if it will be either a target or a normal
clause .

Reply via email to