On Mon, Mar 23, 2020 at 02:40:12PM +0100, Tobias Burnus wrote: > This patch fixes two issues: > > (a) The target size is the pointer size and > host size is the variable size itself; thus, it fails often. > > (b) Only the host variable has the link-var bit flip, hence, > we need to check this one not the target var's size. > > With this patch, the test case passes on AMDGCN. > OK?
I'm puzzled on why it (probably?) happend to work when 4a38b02b4ed0 has been committed, given that the testcase did contain variables in link clauses that didn't have pointer sizes themselves. Anyway, your patch looks good to me. > PS: Unfortunately, all those patches do not help with nvptx, > which still fails (PR 81689) at run-time startup with > ptxas /tmp/ccSRPv5o.o, line 120; error : State space mismatch between > instruction and address in instruction 'ld' Can you post the PTX assembly and perhaps some RTL dump? > libgomp – fix declare target link handling (PR94251) > > PR libgomp/94251 > * target.c (gomp_load_image_to_device): Fix link > variable handling. Thanks. Jakub