[flang-commits] [flang] [flang][OpenMP]Support for subroutine call for DECLARE REDUCTION init (PR #127889)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Mon Feb 24 12:17:16 PST 2025
================
@@ -1482,13 +1482,26 @@ class OmpVisitor : public virtual DeclarationVisitor {
return false;
}
+ bool Pre(const parser::OmpReductionInitializerProc &x) {
+ auto &procDes = std::get<parser::ProcedureDesignator>(x.t);
+ auto &name = std::get<parser::Name>(procDes.u);
+ auto *symbol{FindSymbol(NonDerivedTypeScope(), name)};
+ if (!symbol) {
+ symbol = &MakeSymbol(context().globalScope(), name.source, Attrs{});
+ Resolve(name, *symbol);
+ }
----------------
kiranchandramohan wrote:
Is there a test for this `if` condition? Should it be an error if the Subroutine is not found?
https://github.com/llvm/llvm-project/pull/127889
More information about the flang-commits
mailing list