[flang-commits] [flang] [flang] Catch calls to impure intrinsics from PURE subprograms (PR #160947)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Sun Sep 28 10:38:34 PDT 2025


================
@@ -1638,7 +1638,7 @@ static const IntrinsicInterface intrinsicSubroutine[]{
             {"trim_name", AnyLogical, Rank::scalar, Optionality::optional},
             {"errmsg", DefaultChar, Rank::scalar, Optionality::optional,
                 common::Intent::InOut}},
-        {}, Rank::elemental, IntrinsicClass::impureSubroutine},
+        {}, Rank::elemental, IntrinsicClass::pureSubroutine},
----------------
eugeneepshteyn wrote:

What if the user calls `putenv`? The results could be different between the calls.

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


More information about the flang-commits mailing list