summaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorjnorris <jnorris@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-16 15:29:04 +0000
committerjnorris <jnorris@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-16 15:29:04 +0000
commit2807242662d796c9a63464983219d2fa27d0fbe4 (patch)
treeed6777959d63b9ec1c9b695fcc1d2726804b56d8 /gcc/c
parent37fffac2dc0fdca46ea2ece1f663a1f9e43b470c (diff)
downloadgcc-2807242662d796c9a63464983219d2fa27d0fbe4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233458 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-parser.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 0f3e7560056..b51957ee87e 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-16 James Norris <jnorris@codesourcery.com>
+
+ PR c/64748
+ * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
+
2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
* c-decl.c (build_null_declspecs): Zero the entire struct.
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 7a272447900..23853be205f 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -10766,7 +10766,7 @@ c_parser_oacc_data_clause_deviceptr (c_parser *parser, tree list)
c_parser_omp_var_list_parens() should construct a list of
locations to go along with the var list. */
- if (!VAR_P (v))
+ if (!VAR_P (v) && TREE_CODE (v) != PARM_DECL)
error_at (loc, "%qD is not a variable", v);
else if (TREE_TYPE (v) == error_mark_node)
;