aboutsummaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2014-03-07 09:46:13 +0100
committerThomas Schwinge <tschwinge@gcc.gnu.org>2014-03-07 09:46:13 +0100
commitb17a8b072f2c577d42e5ea4a5ca7d5ff63ec0a41 (patch)
tree7d413f5734b66913e2660f80e881b95d7e0499ef /gcc/langhooks.c
parentc5604b48f91fa510171faf5a6e9d4138799186f1 (diff)
downloadgcc-b17a8b072f2c577d42e5ea4a5ca7d5ff63ec0a41.zip
gcc-b17a8b072f2c577d42e5ea4a5ca7d5ff63ec0a41.tar.gz
gcc-b17a8b072f2c577d42e5ea4a5ca7d5ff63ec0a41.tar.bz2
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. From-SVN: r208394
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index eca0299..d00ebd8 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -524,13 +524,15 @@ lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *c ATTRIBUTE_UNUSED,
{
}
-/* Return true if TYPE is an OpenMP mappable type. By default return true
- if type is complete. */
+/* Return true if TYPE is an OpenMP mappable type. */
bool
lhd_omp_mappable_type (tree type)
{
- return COMPLETE_TYPE_P (type);
+ /* Mappable type has to be complete. */
+ if (type == error_mark_node || !COMPLETE_TYPE_P (type))
+ return false;
+ return true;
}
/* Common function for add_builtin_function and