The minus (-) operator for reductions was deprecated in OpenMP 5.2.
Reference:
(1) OpenMP 5.2 Page 627 Line 18
(1) OpenMP 5.2 Page 124 (Section 5.5) Line 18 and 20
Paths
| Differential D150394
[OpenMP 5.2] Deprecate MINUS (-) operator on reduction clauses ClosedPublic Authored by mdfazlay on May 11 2023, 12:49 PM.
Details
Diff Detail Event Timelinemdfazlay retitled this revision from [OpenMP 5.2] Deprecate MINUS (-) operator from reduction clauses to [OpenMP 5.2] Deprecate MINUS (-) operator on reduction clauses.May 11 2023, 9:31 PM
Comment Actions LG
This revision is now accepted and ready to land.May 17 2023, 4:20 PM
Revision Contents
Diff 523098 clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
clang/test/OpenMP/distribute_simd_reduction_messages.cpp
clang/test/OpenMP/for_reduction_messages.cpp
clang/test/OpenMP/for_simd_reduction_messages.cpp
clang/test/OpenMP/masked_taskloop_in_reduction_messages.cpp
clang/test/OpenMP/masked_taskloop_simd_in_reduction_messages.cpp
clang/test/OpenMP/masked_taskloop_simd_reduction_messages.cpp
clang/test/OpenMP/master_taskloop_in_reduction_messages.cpp
clang/test/OpenMP/master_taskloop_reduction_messages.cpp
clang/test/OpenMP/master_taskloop_simd_in_reduction_messages.cpp
clang/test/OpenMP/master_taskloop_simd_reduction_messages.cpp
clang/test/OpenMP/parallel_for_reduction_messages.cpp
clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp
clang/test/OpenMP/parallel_masked_reduction_messages.cpp
clang/test/OpenMP/parallel_masked_taskloop_reduction_messages.cpp
clang/test/OpenMP/parallel_masked_taskloop_simd_reduction_messages.cpp
clang/test/OpenMP/parallel_master_reduction_messages.cpp
clang/test/OpenMP/parallel_master_taskloop_reduction_messages.cpp
clang/test/OpenMP/parallel_master_taskloop_simd_reduction_messages.cpp
clang/test/OpenMP/parallel_reduction_messages.cpp
clang/test/OpenMP/parallel_sections_reduction_messages.cpp
clang/test/OpenMP/sections_reduction_messages.cpp
clang/test/OpenMP/simd_reduction_messages.cpp
clang/test/OpenMP/target_parallel_for_reduction_messages.cpp
clang/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
clang/test/OpenMP/target_parallel_reduction_messages.cpp
clang/test/OpenMP/target_reduction_messages.cpp
clang/test/OpenMP/target_simd_reduction_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp
clang/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
clang/test/OpenMP/target_teams_reduction_messages.cpp
clang/test/OpenMP/task_in_reduction_message.cpp
clang/test/OpenMP/taskgroup_task_reduction_messages.cpp
clang/test/OpenMP/taskloop_in_reduction_messages.cpp
clang/test/OpenMP/taskloop_reduction_messages.cpp
clang/test/OpenMP/taskloop_reduction_messages_attr.cpp
clang/test/OpenMP/taskloop_simd_in_reduction_messages.cpp
clang/test/OpenMP/taskloop_simd_reduction_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
clang/test/OpenMP/teams_distribute_reduction_messages.cpp
clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp
clang/test/OpenMP/teams_reduction_messages.cpp
|
We already have message for unsupported reduction identifier. Better to modify switch in static bool actOnOMPReductionKindClause function and check if OpenMP > 52, set BOK to BO_Comma, if incoming OOK is OO_Minus. In this case it will be automatically diagnosed for OpenMP>52 as not allowed reduction identifier.