Background
Commit 3f96fe6 added support for the reduction clause on the target construct. This work was motivated by changes in the OpenMP 5.0 spec, which added in_reduction to target. The commit message contains a mistake: reduction itself was never added to target and is still not in the spec today. The exact reasons for adding reduction as well are now lost in antiquity (see comments in PR90754).
The problem
What remains is that the OMP.td file (that defines OpenMP directives and clauses) claims that reduction in an allowed clause for target. It is a cross-project file, and this has detrimental consequences for other projects (e.g. flang) that implement OpenMP, especially since this is not a deviation that’s easy or desirable to accommodate.
What to do next
I propose that we remove reduction from target in OMP.td, and update clang tests to no longer test that combination.
At the same time, since clang has supported this combination for a few years, there may be applications out there that use it. Should we specifically allow it in clang, and keep the current behavior as an extension, or should we simply remove it as non-compliant with the OpenMP spec?
cc: @alexey-bataev @kiranchandramohan @mjklemm @kkwli @jdoerfert