[flang-commits] [flang] [Flang][test] Account for FLANG_TEST_Fortran_FLAGS (PR #213964)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Wed Aug 5 06:50:33 PDT 2026
================
@@ -1,6 +1,10 @@
! RUN: %flang -S -emit-llvm -o - %s | FileCheck %s
! Test communication of COMPILER_OPTIONS from flang to flang -fc1.
-! CHECK: [[OPTSVAR:@_QQclX[0-9A-Fa-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"-S -emit-llvm -o -"
+! In a Flang-standalone build, the driver also injects its own implicit
+! search-path options (e.g. -fintrinsic-modules-path=...) ahead of the
+! options given on the command line above, so allow (and ignore) an
+! arbitrary prefix before the flags under test here.
+! CHECK: [[OPTSVAR:@_QQclX[0-9A-Fa-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"{{.*}}-S -emit-llvm -o -"
----------------
tarunprabhu wrote:
This test is checking that the compiler options are correctly captured. By allowing a wildcard match, the test will no longer do this and will pass if, for example, something in the implementation of `COMPILER_OPTIONS` begins to capture the executable path in addition to the options.
If we know that implicit arguments may be added to the driver invocation - for whatever reason - we should guard against that.
https://github.com/llvm/llvm-project/pull/213964
More information about the flang-commits
mailing list