[all-commits] [llvm/llvm-project] c7e1ec: [flang][OpenMP] Implicitly capture variables in en...

Ritanya-B-Bharadwaj via All-commits all-commits at lists.llvm.org
Mon Mar 2 01:38:26 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7e1ec97b9794da3154f44ad198d9b8eaddc7dfd
      https://github.com/llvm/llvm-project/commit/c7e1ec97b9794da3154f44ad198d9b8eaddc7dfd
  Author: Ritanya-B-Bharadwaj <ritanya.b.bharadwaj at gmail.com>
  Date:   2026-03-02 (Mon, 02 Mar 2026)

  Changed paths:
    M flang/lib/Semantics/resolve-directives.cpp
    A flang/test/Lower/OpenMP/task-implicit-firstprivate.f90

  Log Message:
  -----------
  [flang][OpenMP] Implicitly capture variables in enclosing task for nested firstprivate (#183770)

Fixes https://github.com/llvm/llvm-project/issues/181271
If a variable is marked firstprivate in a nested task but not actually
used in the outer task body, we still need the outer task to capture it
as firstprivate. Otherwise the nested task can end up pointing to the
parallel region’s stack frame, which might already be gone when the
deferred task runs, causing a use-after-free.



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