[all-commits] [llvm/llvm-project] 59ab4d: [flang][OpenMP] Add diagnostic for ATOMIC WRITE wi...

Krish Gupta via All-commits all-commits at lists.llvm.org
Wed Oct 15 11:42:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 59ab4d4bbc07518118a1dab7a0978cbd5f489f8d
      https://github.com/llvm/llvm-project/commit/59ab4d4bbc07518118a1dab7a0978cbd5f489f8d
  Author: Krish Gupta <krishom70 at gmail.com>
  Date:   2025-10-15 (Wed, 15 Oct 2025)

  Changed paths:
    M flang/lib/Semantics/check-omp-atomic.cpp
    M flang/lib/Semantics/check-omp-structure.h
    A flang/test/Semantics/OpenMP/omp-atomic-write-pointer-derived.f90

  Log Message:
  -----------
  [flang][OpenMP] Add diagnostic for ATOMIC WRITE with pointer to non-intrinsic type (#162364)

Fixes https://github.com/llvm/llvm-project/issues/161932

Added a check for non-intrinsic types in non-pointer assignments.

Added bool checkTypeOnPointer = true to both CheckAtomicVariable and
CheckAtomicType. All atomic assignment functions now pass
!IsPointerAssignment(...) to control the check. The pointer-to-non-intrinsic
check lives in CheckAtomicType, guarded by the checkTypeOnPointer flag.
The check now applies uniformly to all atomic operations while properly
excluding pointer assignments (=>).

---------

Co-authored-by: Krish Gupta <krishgupta at Krishs-MacBook-Air.local>



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