[flang] [llvm] [mlir] [flang][llvm][OpenMP][OpenACC] Add implicit casts to omp.atomic and acc.atomic (PR #131603)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 06:43:00 PDT 2025


================
@@ -0,0 +1,48 @@
+!RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenacc -o - %s 2>&1 | FileCheck %s
+
+!CHECK: not yet implemented: atomic capture requiring implicit type casts 
+subroutine capture_with_convert_f32_to_i32()
+    implicit none
+    integer :: k, v, i
+
+    k = 1
+    v = 0
+
+    !$acc atomic capture
+    v = k
+    k = (i + 1) * 3.14
+    !$acc end atomic
+end subroutine
+
+subroutine capture_with_convert_i32_to_f64()
----------------
NimishMishra wrote:

The second TODO onwards would not be generated, since the compiler would exit at the first TODO. 

I could move all these tests into different files; I just wanted to store these tests here, so whenever we fix `atomic capture`, we address all of these.

https://github.com/llvm/llvm-project/pull/131603


More information about the llvm-commits mailing list