[all-commits] [llvm/llvm-project] ae5a29: [OpenMP] Fix OpenMP reduction segfault with non-co...

Zahira Ammarguellat via All-commits all-commits at lists.llvm.org
Thu Sep 24 09:37:47 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae5a2966682bb89d0cba976f0459eb1adc20f8bc
      https://github.com/llvm/llvm-project/commit/ae5a2966682bb89d0cba976f0459eb1adc20f8bc
  Author: Zahira Ammarguellat <zahira.ammarguellat at intel.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/test/OpenMP/for_reduction_codegen_UDR.cpp
    A clang/test/OpenMP/reduction_non_copyable_with_initializer.cpp

  Log Message:
  -----------
  [OpenMP] Fix OpenMP reduction segfault with non-copyable types and user initializers. (#219265)

OpenMP custom reductions with user-defined initializers segfault when
the reduction variable type is non-copyable and has non-trivial members
(e.g., std::string). `Clang` was emitting only the user initializer
function call, leaving non-trivial
members uninitialized with garbage values, causing segfaults when those
members are accessed or assigned.
See https://godbolt.org/z/bboqKbhsT
This patch fixes the issue.



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