[PATCH] D90697: [Flang][OpenMP 4.5] Add semantic check for OpenMP Reduction Clause

Yashaswini Hegde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 23:11:13 PST 2020


yhegde added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:459
+          [&](const parser::ProcedureDesignator &procD) {
+            const parser::Name *name{std::get_if<parser::Name>(&procD.u)};
+          },
----------------
kiranchandramohan wrote:
> Is some code missing here?
> 
> Is that the reason why the following code does not work?
> ```
> program test
>   integer :: y
>   !$omp parallel reduction(max:y)
>     y = 1
>   !$omp end parallel
> end program
> ```
> 
> 
That failure was due to missing Name symbol in ProcedureDesignator. I have tried to fix it. Now please let me know the following is the positive case? or do I need to catch it?
program test
  integer :: y
  !$omp parallel  reduction(foo:y)
    y = foo(1,0)
  !$omp end parallel 
end program


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90697/new/

https://reviews.llvm.org/D90697



More information about the llvm-commits mailing list