ABataev added inline comments.
================
Comment at: clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp:93
;
-#pragma omp target parallel for private(ps) is_device_ptr(ps) //
expected-error{{private variable cannot be in a is_device_ptr clause in
'#pragma omp target parallel for' directive}} expected-note{{defined as
private}}
+#pragma omp target parallel for private(ps) is_device_ptr(ps)
for (int ii=0; ii<10; ii++)
----------------
jdoerfert wrote:
> I think this should cause an error or at least a warning. Telling the
> compiler `ps` is a device pointer only to create a local uninitialized
> shadowing variable seems like an error to me.
It is allowed according to OpenMP 5.0. Private copy must be created in the
context of the parallel region, not the target region. So, for OpenMP 5.0 we
should not emit error here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65835/new/
https://reviews.llvm.org/D65835
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits