[flang-commits] [flang] [Flang][OpenMP] Issue error if reduction clause has proc-pointer (PR #88999)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed Apr 17 03:43:50 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());
+ }
+ }
----------------
tblah wrote:
nit - I am probably being too pedantic here but perhaps this should be in `CheckReductionTypeList`?
https://github.com/llvm/llvm-project/pull/88999
More information about the flang-commits
mailing list