[flang-commits] [flang] [Flang][OpenMP] Issue error if reduction clause has proc-pointer (PR #88999)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Thu Apr 18 04:27:37 PDT 2024
================
@@ -2285,7 +2285,19 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Reduction &x) {
if (CheckReductionOperators(x)) {
CheckReductionTypeList(x);
}
+
+ SymbolSourceMap symbols;
+ const auto &ompObjectList{std::get<parser::OmpObjectList>(x.v.t)};
+ GetSymbolsInObjectList(ompObjectList, symbols);
+ for (auto &[symbol, source] : symbols) {
+ if (IsProcedurePointer(*symbol)) {
+ context_.Say(source,
+ "A procedure pointer '%s' must not appear in a REDUCTION clause."_err_en_US,
+ symbol->name());
+ }
+ }
----------------
kiranchandramohan wrote:
Will do that before I submit.
https://github.com/llvm/llvm-project/pull/88999
More information about the flang-commits
mailing list