[flang-commits] [flang] [flang] fix private pointers and default initialized variables (PR #118494)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Tue Dec 3 07:41:00 PST 2024


================
@@ -0,0 +1,52 @@
+! Test default initialization of DO CONCURRENT LOCAL() entities.
+! RUN: bbc -emit-hlfir -I nowhere -o - %s | FileCheck %s
+
+subroutine test_ptr(p)
+  interface
+    pure subroutine takes_ptr(p)
+      character(*), intent(in), pointer :: p(:)
+    end subroutine
+  end interface
+  character(*), pointer :: p(:)
+  integer :: i
+  do concurrent (i=1:10) local(p)
+    call takes_ptr(p)
+  end do
+end subroutine
+
+subroutine test_default_init(p)
----------------
eugeneepshteyn wrote:

`p` is unused here, right? I don't think it's needed for this particular test, so maybe just remove `p`?

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


More information about the flang-commits mailing list