[flang-commits] [flang] [Flang][Parser] Handle compiler directives inside INTERFACE blocks (PR #198516)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Wed May 27 05:27:28 PDT 2026
================
@@ -0,0 +1,42 @@
+! RUN: %python %S/test_modfile.py %s %flang_fc1
+! Check that recognized compiler directives in interface blocks
+! survive module file serialization and parsing.
+
+module m
+ interface
+ subroutine sub(x)
+!dir$ ignore_tkr(t) x
+ real, intent(in) :: x
+ end subroutine
+ end interface
+end module
+
+!Expect: m.mod
+!module m
+! interface
+! subroutine sub(x)
+! real(4),intent(in)::x
+! !dir$ ignore_tkr(t) x
----------------
eugeneepshteyn wrote:
Well, `ignore_tkr` is inside subroutine declaration and this worked before this PR. Is there any directive that could be between the procedure declarations that currently could survive serialization to the module? If not, then we can't have such test now.
https://github.com/llvm/llvm-project/pull/198516
More information about the flang-commits
mailing list