[flang-commits] [flang] [flang] Better handling of ALLOCATED(pointer) error (PR #186622)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Mar 16 07:19:51 PDT 2026


================
@@ -3802,6 +3802,21 @@ std::optional<SpecificCall> IntrinsicProcTable::Implementation::Probe(
       return HandleC_Devloc(arguments, context);
     } else if (call.name == "null") {
       return HandleNull(arguments, context);
+    } else if (call.name == "allocated") {
+      if (context.languageFeatures().IsEnabled(
+              common::LanguageFeature::AllocatedForAssociated) &&
+          arguments.size() == 1 && arguments[0].has_value()) {
+        auto &arg{*arguments[0]};
----------------
eugeneepshteyn wrote:

What about args passed by keywords? `ALLOCATED` supports `array=` or `scalar=`, whereas `ASSOCIATED` supports `pointer=`.

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


More information about the flang-commits mailing list