This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/64748] New: OpenACC: "is not a variable" error with deviceptr()
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Jan 2015 13:35:53 +0000
- Subject: [Bug c/64748] New: OpenACC: "is not a variable" error with deviceptr()
- Auto-submitted: auto-generated
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;
}
}
}