This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/64748] OpenACC: "is not a variable" error with deviceptr()
- From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Feb 2015 12:57:51 +0000
- Subject: [Bug c/64748] OpenACC: "is not a variable" error with deviceptr()
- Auto-submitted: auto-generated
- References: <bug-64748-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64748
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-02-10
CC| |jakub at gcc dot gnu.org,
| |jnorris at gcc dot gnu.org,
| |tschwinge at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
This also needs to be fixed for C++.
I think I based the OpenACC deviceptr code on c_parser_omp_threadprivate --
does that have the same issue then? Note that the C++ front end code for
OpenMP threadprivate, gcc/cp/parser.c:cp_parser_omp_threadprivate and
gcc/cp/semantics.c:finish_omp_threadprivate is different from the C code, which
probably also would be good to unify?
I have found the following note in my TODO list, which can then also be
verified/addressed at the same time:
goto l;
l:
#pragma acc parallel deviceptr(l) /* { dg-error "'l' is not a pointer
variable" } */
;
#pragma acc parallel deviceptr(l[1:3])
/* { dg-error "'l' is not a pointer variable" "" { target *-*-* } 15 } */
/* { dg-error "expected ')' before '\[' token" "" { target *-*-* } 15 }
*/
;