summaryrefslogtreecommitdiffstats
path: root/gcc/c
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-07 08:46:13 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-07 08:46:13 +0000
commit9ec099a32922dfdf52e90d5dbfa11c09521e0b19 (patch)
tree7d413f5734b66913e2660f80e881b95d7e0499ef /gcc/c
parent1329f16062bf0a3ba0d9db621073a8431256ed2a (diff)
downloadppe42-gcc-9ec099a32922dfdf52e90d5dbfa11c09521e0b19.tar.gz
ppe42-gcc-9ec099a32922dfdf52e90d5dbfa11c09521e0b19.zip
The error_mark_node is not an OpenMP mappable type.
gcc/ * langhooks.c (lhd_omp_mappable_type): The error_mark_node is not an OpenMP mappable type. gcc/c/ * c-decl.c (c_decl_attributes): Use lang_hooks.types.omp_mappable_type. * c-typeck.c (c_finish_omp_clauses): Likewise. gcc/testsuite/ * c-c++-common/gomp/map-1.c: Extend. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-decl.c2
-rw-r--r--gcc/c/c-typeck.c8
3 files changed, 11 insertions, 5 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index e9d25d5b866..9d854a7feb6 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-decl.c (c_decl_attributes): Use
+ lang_hooks.types.omp_mappable_type.
+ * c-typeck.c (c_finish_omp_clauses): Likewise.
+
2014-03-06 Marek Polacek <polacek@redhat.com>
PR c/60197
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 7a7d68edf95..2c41bf2ce92 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -4024,7 +4024,7 @@ c_decl_attributes (tree *node, tree attributes, int flags)
error ("%q+D in block scope inside of declare target directive",
*node);
else if (TREE_CODE (*node) == VAR_DECL
- && !COMPLETE_TYPE_P (TREE_TYPE (*node)))
+ && !lang_hooks.types.omp_mappable_type (TREE_TYPE (*node)))
error ("%q+D in declare target directive does not have mappable type",
*node);
else
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 7c4ba0eb225..524a59f12e2 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -12032,7 +12032,7 @@ c_finish_omp_clauses (tree clauses)
else
{
t = OMP_CLAUSE_DECL (c);
- if (!COMPLETE_TYPE_P (TREE_TYPE (t)))
+ if (!lang_hooks.types.omp_mappable_type (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"array section does not have mappable type "
@@ -12061,9 +12061,9 @@ c_finish_omp_clauses (tree clauses)
}
else if (!c_mark_addressable (t))
remove = true;
- else if (!COMPLETE_TYPE_P (TREE_TYPE (t))
- && !(OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
- && OMP_CLAUSE_MAP_KIND (c) == OMP_CLAUSE_MAP_POINTER))
+ else if (!(OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
+ && OMP_CLAUSE_MAP_KIND (c) == OMP_CLAUSE_MAP_POINTER)
+ && !lang_hooks.types.omp_mappable_type (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"%qD does not have a mappable type in %qs clause", t,
OpenPOWER on IntegriCloud