[flang-commits] [flang] [flang][OpenMP] Lowering support for declare variant. (PR #206988)

Abid Qadeer via flang-commits flang-commits at lists.llvm.org
Thu Jul 2 02:33:30 PDT 2026


================
@@ -0,0 +1,23 @@
+! RUN: %flang_fc1 -emit-fir -fopenmp -fopenmp-version=51 %s -o - | FileCheck %s
+
+module m
+contains
+  subroutine base
+    !$omp declare variant (base:vsub) match (construct={parallel})
+  contains
+    subroutine vsub
+    end subroutine
+  end subroutine base
+
+  subroutine caller
----------------
abidh wrote:

Thanks for having a look. I had the separate-compilation support part of this PR but that made it a bit too big for review. So I cut it out of it and will post as follow-up PR. I will update the PR summary about the limitation and will investigate if I can write a TODO test for it.

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


More information about the flang-commits mailing list