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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #2)
> Created attachment 65482 [details]
> Testcase that uses pointer attachment to global variable

With host fallback the result is the expected

0x7ffeae66670c / 0x7ffeae666708 / 0x7ffeae666704 / 0x7ffeae666700 - host
0x7ffeae66670c / 0x7ffeae666708 / 0x7ffeae666704 / 0x7ffeae666700 - device host

with mapping, the result is the following – note that the 3rd value is the same
as the host because I messed up:

0x7fff1c2f1ebc / 0x7fff1c2f1eb8 / 0x7fff1c2f1eb4 / 0x7fff1c2f1eb0 - host
0x7f4603600000 / 0x7f4603600200 / 0x7fff1c2f1eb4 / 0x7f4603600400 - device
nohost

but with GOMP_TARGET_OFFLOAD=enabled
(nil) / (nil) / 0x7ffd90bd5bf4 / (nil) - device nohost

i.e. the values aren't updated.

And with 'always' in the map clauses:

0x7ffcd169c4bc / 0x7ffcd169c4b8 / 0x7ffcd169c4b4 / 0x7ffcd169c4b0 - host
0x7ffcd169c4bc / (nil) / 0x7ffcd169c4b4 / (nil) - device nohost

i.e. the simple 'p' update worked - but not the array one + struct one.

Reply via email to