[flang-commits] [flang] [flang] Recognize IARGC and GETARG as aliases for F2003 intrinsics (PR #173973)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Tue Dec 30 09:32:39 PST 2025


https://github.com/tarunprabhu requested changes to this pull request.

The test that you have added does not actually test for anything. At best, it checks that the frontend does not raise an error, but that is not terribly helpful. In the future, if someone were to change the mapping in `flang/lib/Evaluate/intrinsics.cpp`, the test would pass, but any code that uses `IARGC` may be miscompiled.

What you want to do here is to check that the lowering of the intrinsics to `FIR` is as expected. In this specific case, since `IARGC` and `COMMAND_ARGUMENT_COUNT` are expected to behave in exactly the same way, their lowering to FIR should be identical. Tests for `COMMAND_ARGUMENT_COUNT` already exist in `flang/test/Lower/Intrinsics/`.

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


More information about the flang-commits mailing list