[flang-commits] [flang] [Flang] Add `INLINEALWAYS` Compiler Directive (PR #192674)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Mon Apr 20 08:59:29 PDT 2026


================
@@ -0,0 +1,22 @@
+! Check the appropriate flags are added to inline functions when inlinealways is used, or ignored when the name is incorrect.
+
+! RUN: %flang_fc1 -emit-hlfir %s -o - | FileCheck %s
+
+subroutine test_function()
+  !DIR$ INLINEALWAYS test_function
+end subroutine
+! CHECK: func.func @_QPtest_function() attributes {llvm.always_inline} {
+
+subroutine test_function2()
+end subroutine
+
+subroutine test_function3()
+  !DIR$ INLINEALWAYS wrong_func
+end subroutine
+! CHECK: func.func @_QPtest_function2() {
----------------
tblah wrote:

This should be test_function2 and there should be a different line for test_function3

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


More information about the flang-commits mailing list