[all-commits] [llvm/llvm-project] c57f88: [flang][OpenMP] Fix metadirective loop semantic ch...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Wed Jul 15 09:14:03 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c57f88d5178861974c8bcd61657d87275c835aa5
      https://github.com/llvm/llvm-project/commit/c57f88d5178861974c8bcd61657d87275c835aa5
  Author: Chi-Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M flang/include/flang/Semantics/openmp-utils.h
    M flang/lib/Semantics/check-omp-structure.cpp
    M flang/lib/Semantics/check-omp-structure.h
    M flang/lib/Semantics/check-omp-variant.cpp
    M flang/lib/Semantics/openmp-utils.cpp
    M flang/test/Semantics/OpenMP/metadirective-loop-applicability.f90
    M flang/test/Semantics/OpenMP/metadirective-loop-nest.f90
    M flang/unittests/Semantics/OpenMPUtils.cpp

  Log Message:
  -----------
  [flang][OpenMP] Fix metadirective loop semantic checks (#208844)

This is a follow-up to https://github.com/llvm/llvm-project/pull/207088.

Post-merge review feedback:

* Rename mayVariantBeSelected to MayVariantBeSelected and move it to
  the shared OpenMP semantic utilities so declare-variant checking can
  reuse it.
* Explain why a WHEN selector is recorded only when its modifier list
  contains exactly one element.
* Diagnose loop-associated variants that end a declaration-only
  program unit, such as a module with no execution part.

Additional correctness fixes:

* Handle consecutive metadirectives and modules or submodules with
  contained procedures without silently dropping an earlier
  loop-associated variant.
* Prevent a loop-associated variant in an interface, BLOCK construct,
  conditional branch, or nested body from being checked against an
  unrelated loop outside that scope.
* Avoid false or missing loop diagnostics when match_any or match_none
  combines target selectors with user or construct selectors.

Assisted with codex.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list