[flang-commits] [flang] [flang][OpenMP] Diagnose invalid capture statements in ATOMIC (PR #233330)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Oct 19 08:55:54 PDT 2026
================
@@ -843,7 +843,8 @@ void OmpStructureChecker::CheckAtomicCaptureAssignment(
assert(GetConvertInput(capture.rhs) &&
IsSameAtomicVariable(*GetConvertInput(capture.rhs), atom) &&
"This cannot be a capture assignment");
- CheckStorageOverlap(atom, {cap}, source);
+ // Lowering can't handle v and x being the same, so make it an error.
----------------
tblah wrote:
This is not an acceptable reason to create a semantic error. Semantics should ensure a program conforms with the standards (plus extensions implemented in flang). If Flang's lowering does not implement something allowed by the standard then this should be caught by a "not yet implemented" message (you can grep the tests for some examples).
However, I think in this case OpenMP actually does prohibit overlapping storage. Please could you verify this and then update these comments and the commit message with justifications based upon the OpenMP standard.
https://github.com/llvm/llvm-project/pull/233330
More information about the flang-commits
mailing list