aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorJames Norris <jnorris@codesourcery.com>2016-02-16 15:29:04 +0000
committerJames Norris <jnorris@gcc.gnu.org>2016-02-16 15:29:04 +0000
commitba539195610794575f76e8dd2e16f548c4f89dbb (patch)
treeed6777959d63b9ec1c9b695fcc1d2726804b56d8 /gcc/cp/parser.c
parent2a2b8f64889632aed99c358fbfddb10ab8774242 (diff)
downloadgcc-ba539195610794575f76e8dd2e16f548c4f89dbb.zip
gcc-ba539195610794575f76e8dd2e16f548c4f89dbb.tar.gz
gcc-ba539195610794575f76e8dd2e16f548c4f89dbb.tar.bz2
re PR c/64748 (OpenACC: "is not a variable" error with deviceptr())
PR c/64748 gcc/c/ * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms. gcc/cp/ * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking. * semantics.c (finish_omp_clauses): Add deviceptr checking. gcc/testsuite/ * c-c++-common/goacc/deviceptr-1.c: Add tests. * g++.dg/goacc/deviceptr-1.c: New file. From-SVN: r233458
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 07d1821..b8d8237 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -30105,20 +30105,6 @@ cp_parser_oacc_data_clause_deviceptr (cp_parser *parser, tree list)
for (t = vars; t; t = TREE_CHAIN (t))
{
tree v = TREE_PURPOSE (t);
-
- /* FIXME diagnostics: Ideally we should keep individual
- locations for all the variables in the var list to make the
- following errors more precise. Perhaps
- c_parser_omp_var_list_parens should construct a list of
- locations to go along with the var list. */
-
- if (!VAR_P (v))
- error_at (loc, "%qD is not a variable", v);
- else if (TREE_TYPE (v) == error_mark_node)
- ;
- else if (!POINTER_TYPE_P (TREE_TYPE (v)))
- error_at (loc, "%qD is not a pointer variable", v);
-
tree u = build_omp_clause (loc, OMP_CLAUSE_MAP);
OMP_CLAUSE_SET_MAP_KIND (u, GOMP_MAP_FORCE_DEVICEPTR);
OMP_CLAUSE_DECL (u) = v;