[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 03:58:52 PDT 2025
================
@@ -226,7 +228,12 @@ T tmain(T argc) {
#pragma omp parallel for reduction(+ : fl)
for (int i = 0; i < 10; ++i)
foo();
-
+#if defined(_OPENMP) && (_OPENMP >= 202411)
+#pragma omp parallel private(fl)
+#pragma omp for reduction(original(abcxx),+:fl) // expected-error {{private or shared or default}} expected-warning {{extra tokens at the end of '#pragma omp for'}}
----------------
alexey-bataev wrote:
More tests are required, including incorrect syntax, templates, etc.
https://github.com/llvm/llvm-project/pull/129938
More information about the cfe-commits
mailing list