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

--- Comment #9 from cesar at gcc dot gnu.org ---
(In reply to Tom de Vries from comment #8)

> Hmm, for me that minimizes to:
> ...
> extern "C" void abort ();
> 
> #pragma omp declare target
> int results[2000];
> #pragma omp end declare target
> 
> int
> main ()
> {
> #pragma omp target teams map (always, tofrom: results)
>   {
>     results[75] = 1;
>   }
>   if (results[75] == 0)
>     abort ();
> }
> ...

If omp declare target behaves like acc declare, wouldn't you still need to
update the host's copy of results? I'd expect results[75] to be zero outside of
the omp target region.

Reply via email to