[flang-commits] [clang] [flang] [llvm] [flang] Improvise the error message for the option "-fconvert" with allowed values (PR #215966)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Fri Aug 14 06:08:33 PDT 2026


================
@@ -20,10 +22,17 @@
 ! RUN: %flang_fc1 -emit-mlir -fconvert=big-endian %s -o - | FileCheck %s --check-prefix=VALID_FC1
 ! RUN: %flang_fc1 -emit-mlir -fconvert=swap %s -o - | FileCheck %s --check-prefix=VALID_FC1
 ! RUN: not %flang_fc1 -fconvert=foobar %s  2>&1 | FileCheck %s --check-prefix=INVALID
+! RUN: not %flang_fc1 -fconvert=big_endian %s  2>&1 | FileCheck %s --check-prefix=INVALID-BIG-ENDIAN
+! RUN: not %flang_fc1 -fconver=Foobar %s  2>&1 | FileCheck %s --check-prefix=UNKNOWN-OPTION
----------------
tarunprabhu wrote:

The closest option that is returned would depend on totally unrelated options that may be supported by the compiler. Would the test fail if an option like `fconverg` were added in the future? In this case, what is the "correct" behavior?

It seems to me that this has the potential to fail in the future for completely unrelated reasons. I am also not sure how valuable it is. I would recommend removing it.

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


More information about the flang-commits mailing list