Pointer dereference is equal to access of first array element which is already allowed for the reduction clause.
While at it also add test for CodeGen of reduction on array element which seemed to be missing.
Paths
| Differential D18276
[OpenMP] Allow reduction on pointer dereference AbandonedPublic Authored by Hahnfeld on Mar 18 2016, 1:04 PM.
Details
Summary Pointer dereference is equal to access of first array element which is already allowed for the reduction clause. While at it also add test for CodeGen of reduction on array element which seemed to be missing.
Diff Detail Event TimelineHahnfeld updated this object.
Revision Contents
Diff 51062 lib/CodeGen/CGStmtOpenMP.cpp
lib/Sema/SemaOpenMP.cpp
test/OpenMP/for_reduction_codegen.cpp
test/OpenMP/for_reduction_messages.cpp
test/OpenMP/parallel_ast_print.cpp
test/OpenMP/target_parallel_ast_print.cpp
test/OpenMP/target_parallel_for_ast_print.cpp
|
This is not allowed by OpenMP standard. I added support for array subscripts because they are very similar to array sections, but unary operations are definitely not allowed