summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/c-c++-common/gomp
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/testsuite/c-c++-common/gomp
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/testsuite/c-c++-common/gomp')
-rw-r--r--gcc/testsuite/c-c++-common/gomp/map-1.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/map-1.c b/gcc/testsuite/c-c++-common/gomp/map-1.c
index 694d88cc795..5dad7d6a9aa 100644
--- a/gcc/testsuite/c-c++-common/gomp/map-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/map-1.c
@@ -8,6 +8,8 @@ int k[10], l[10], m[10], n[10], o;
int *p;
int **q;
int r[4][4][4][4][4];
+extern struct s s1;
+extern struct s s2[1]; /* { dg-error "array type has incomplete element type" "" { target c } } */
int t[10];
#pragma omp threadprivate (t)
#pragma omp declare target
@@ -32,6 +34,10 @@ foo (int g[3][10], int h[4][8], int i[2][10], int j[][9],
;
#pragma omp target map(to: o[2:5]) /* { dg-error "does not have pointer or array type" } */
;
+ #pragma omp target map(alloc: s1) /* { dg-error "'s1' does not have a mappable type in 'map' clause" } */
+ ;
+ #pragma omp target map(alloc: s2) /* { dg-error "'s2' does not have a mappable type in 'map' clause" } */
+ ;
#pragma omp target map(to: a[:][:]) /* { dg-error "array type length expression must be specified" } */
bar (&a[0][0]); /* { dg-error "referenced in target region does not have a mappable type" } */
#pragma omp target map(tofrom: b[-1:]) /* { dg-error "negative low bound in array section" } */
OpenPOWER on IntegriCloud