[flang-commits] [flang] [flang][OpenMP] Lowering support for declare variant. (PR #206988)
Sairudra More via flang-commits
flang-commits at lists.llvm.org
Wed Jul 1 20:43:33 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
----------------
Saieiei wrote:
This test keeps the module and caller in the same compilation unit, so it does not seem to exercise whether the declare-variant metadata survives a `.mod` round-trip. Is separate-compilation support intended here? If yes, could we add a true two-file/module round-trip test? If not, it may be worth documenting the limitation or adding a TODO test so this does not silently fall back to the base procedure.
https://github.com/llvm/llvm-project/pull/206988
More information about the flang-commits
mailing list