From b17a8b072f2c577d42e5ea4a5ca7d5ff63ec0a41 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 7 Mar 2014 09:46:13 +0100 Subject: 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 --- gcc/langhooks.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/langhooks.c') 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 -- cgit v1.1