[flang-commits] [flang] [Flang] External subprograms should be allowed as proc_target in procedure pointers. (PR #183268)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Apr 6 13:25:57 PDT 2026


================
@@ -0,0 +1,30 @@
+! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s
+
+module m1
+  external :: sub
+  type ty
+    procedure(), pointer, nopass :: ptr5 => sub
+  end type
+  procedure(), pointer :: ptr6 => sub
+end module
+
+use m1
+integer :: jj = 4
+call ptr6(10)
+print *, "Pass"
+end
+
+subroutine sub(a)
+  integer :: a
+  print *, "sub"
+end subroutine
+
----------------
eugeneepshteyn wrote:

Could you please also add a case of external function, similar to external procedure?

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


More information about the flang-commits mailing list