[flang-commits] [flang] [flang][hlfir] patch for assumed shape dummy with VALUE keyword (PR #70391)

Anthony Cabrera via flang-commits flang-commits at lists.llvm.org
Tue Oct 31 11:42:02 PDT 2023


================
@@ -977,10 +977,14 @@ class Fortran::lower::CallInterfaceImpl {
       addPassedArg(PassEntityBy::MutableBox, entity, characteristics);
     } else if (dummyRequiresBox(obj, isBindC)) {
       // Pass as fir.box or fir.class
-      if (isValueAttr)
-        TODO(loc, "assumed shape dummy argument with VALUE attribute");
-      addFirOperand(boxType, nextPassedArgPosition(), Property::Box, attrs);
-      addPassedArg(PassEntityBy::Box, entity, characteristics);
+      Property prop = Property::Box;
+      PassEntityBy passBy = PassEntityBy::Box;
+      if (isValueAttr) {
+        passBy = PassEntityBy::BaseAddressValueAttribute;
+        prop = Property::Value;
+      }
----------------
cabreraam wrote:

Thanks for the feedback! I integrated this feedback into a new commit. Let me know what you think.

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


More information about the flang-commits mailing list