[all-commits] [llvm/llvm-project] 49fb22: Diagnose oversized COLLAPSE/ORDERED on metadirecti...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Fri Jun 26 11:50:46 PDT 2026


  Branch: refs/heads/users/cchen/flang-metadirective-loop
  Home:   https://github.com/llvm/llvm-project
  Commit: 49fb22b7c4954a2c1dac726e0a20e22d68bd75c0
      https://github.com/llvm/llvm-project/commit/49fb22b7c4954a2c1dac726e0a20e22d68bd75c0
  Author: Chi Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-06-26 (Fri, 26 Jun 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/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
    A flang/test/Semantics/OpenMP/metadirective-loop-nest.f90

  Log Message:
  -----------
  Diagnose oversized COLLAPSE/ORDERED on metadirective loop variants

A loop-associated METADIRECTIVE variant is only resolved during lowering, so
its COLLAPSE/ORDERED was never range-checked; an oversized argument (e.g.
`do collapse(3)` over a two-deep nest) reached lowering and crashed on an
assertion.

Check it in OmpStructureChecker against the loop nest that follows the
metadirective, emitting the same error a real loop-associated construct
produces. The lowering path keeps a non-asserting fallback so it bails
cleanly instead of asserting if the semantic check is bypassed.



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