diff options
Diffstat (limited to 'gcc/config/riscv/riscv-vector-builtins.cc')
-rw-r--r-- | gcc/config/riscv/riscv-vector-builtins.cc | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc index d2fe849..61dcdab 100644 --- a/gcc/config/riscv/riscv-vector-builtins.cc +++ b/gcc/config/riscv/riscv-vector-builtins.cc @@ -4724,7 +4724,11 @@ bool verify_type_context (location_t loc, type_context_kind context, const_tree type, bool silent_p) { - if (!sizeless_type_p (type)) + const_tree tmp = type; + if (omp_type_context (context) && POINTER_TYPE_P (type)) + tmp = strip_pointer_types (tmp); + + if (!sizeless_type_p (tmp)) return true; switch (context) @@ -4796,6 +4800,34 @@ verify_type_context (location_t loc, type_context_kind context, const_tree type, error_at (loc, "capture by copy of RVV type %qT", type); return false; + + case TCTX_OMP_MAP: + if (!silent_p) + error_at (loc, "RVV type %qT not allowed in %<map%> clause", type); + return false; + + case TCTX_OMP_MAP_IMP_REF: + if (!silent_p) + error ("cannot reference %qT object types in %<target%> region", type); + return false; + + case TCTX_OMP_PRIVATE: + if (!silent_p) + error_at (loc, "RVV type %qT not allowed in" + " %<target%> %<private%> clause", type); + return false; + + case TCTX_OMP_FIRSTPRIVATE: + if (!silent_p) + error_at (loc, "RVV type %qT not allowed in" + " %<target%> %<firstprivate%> clause", type); + return false; + + case TCTX_OMP_DEVICE_ADDR: + if (!silent_p) + error_at (loc, "RVV type %qT not allowed in" + " %<target%> device clauses", type); + return false; } gcc_unreachable (); |