On 05/04/16 12:16, Tom de Vries wrote: > On 24/03/16 17:59, Tom de Vries wrote: >> Hi, >> >> This patch fixes an incorrect warning for the oacc copy clause. >> >> Consider this test-case: >> ... >> void >> foo (void) >> { >> int i; >> >> #pragma acc kernels >> { >> i = 1; >> } >> } >> ... >> >> >> When compiling with -fopenacc -Wuninitialized, we get an 'is used >> uninitialized' warning for variable 'i', which is confusing given that >> 'i' is not used, but only set in the kernels region. >> >> The warning occurs because there's an implicit copy(i) clause on the >> kernels region, and that copy generates a read of i before the region, >> and a write to i in region. >> >> The patch silences the warning by marking the variable in the copy >> clause with TREE_NO_WARNING. >> >> Build and reg-tested with goacc.exp, gomp.exp and target-libgomp. >> >> OK for trunk if bootstrap and reg-test succeeds? >> > > Ping. > Committed as attached, with only the testcases. The code change has been committed as part of the fix for PR70550. Thanks, - TOm