https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64748
Bug ID: 64748 Summary: OpenACC: "is not a variable" error with deviceptr() Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: openacc, rejects-valid Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org From https://github.com/jefflarkin/openacc-interoperability/ The following program seems to compile with PGI's and Cray's compilers. With GCC, it shows the odd: foo.c:3:30: error: ‘arr’ is not a variable #pragma acc kernels deviceptr(arr) ^ void set(int n, float val, float * restrict arr) { #pragma acc kernels deviceptr(arr) { for(int i=0; i<n; i++) { arr[i] = val; } } }