[PATCH] D90697: [Flang][OpenMP 4.5] Add semantic check for OpenMP Reduction Clause
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 05:35:29 PST 2020
kiranchandramohan 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)};
+ },
----------------
yhegde wrote:
> 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
> 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
Catch it as in provide an error if there is no declare reduction for foo? If so that can be left for the semantics check of declare reduction. Please add an entry in the excel sheet for this.
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