[flang-commits] [flang] [flang][OpenMP] Improve diagnosing invalid operators in DECLARE_REDUCTION (PR #232353)
via flang-commits
flang-commits at lists.llvm.org
Sun Oct 25 20:44:02 PDT 2026
================
@@ -771,8 +771,26 @@ void OmpStructureChecker::Enter(const parser::OmpMetadirectiveDirective &x) {
EnterDirectiveNest(MetadirectiveNest);
}
-void OmpStructureChecker::Leave(const parser::OmpMetadirectiveDirective &) {
- ExitDirectiveNest(MetadirectiveNest);
+void OmpStructureChecker::Leave(const parser::OmpMetadirectiveDirective &x) {
+ // Perform semantic checks on declarative variants on this METADIRECTIVE.
+ if (!partStack_.empty() && partStack_.back() == PartKind::SpecificationPart) {
----------------
MattPD wrote:
Flang now rejects the explicit AT(COMPILATION) case, but it still accepts the same `/` declaration with `otherwise(error)` under `-fsyntax-only`. Is it possible to also diagnose `/` in the implicit compilation-time form? Flang built from [the PR's merge base](https://github.com/llvm/llvm-project/commit/ccda5d7abf91e00b91c743ed1e6a1cd200b42997) rejects it.
https://github.com/llvm/llvm-project/pull/232353
More information about the flang-commits
mailing list