[flang-commits] [flang] [flang][cuda] Move function result assignment to managed variable on host (PR #163705)
    Zhen Wang via flang-commits 
    flang-commits at lists.llvm.org
       
    Thu Oct 16 09:33:57 PDT 2025
    
    
  
================
@@ -1,27 +1,23 @@
 ! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
 
+! Check for implicit data transfer of managed variable
+
 subroutine testr2(N1,N2)
   real(4), managed :: ai4(N1,N2)
   real(4), allocatable :: bRefi4(:)
 
   integer :: i1, i2
 
-  do i2 = 1, N2
-    do i1 = 1, N1
-      ai4(i1,i2) = i1 + N1*(i2-1)
----------------
wangzpgi wrote:
Why do we remove the initialization of `ai4` here in this example?
https://github.com/llvm/llvm-project/pull/163705
    
    
More information about the flang-commits
mailing list