[flang-commits] [flang] [flang] Lower passing non assumed-rank/size to assumed-ranks (PR #79145)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Tue Jan 23 09:53:24 PST 2024


================
@@ -942,6 +964,18 @@ static PreparedDummyArgument preparePresentUserCallActualArgument(
       (passingPolymorphicToNonPolymorphic ||
        !Fortran::evaluate::IsSimplyContiguous(expr, foldingContext));
 
+  // Create dummy type with actual argument rank when the dummy is an assumed
+  // rank. That way, all the operation to create dummy descriptors are ranked if
+  // the dummy is ranked, which allows simple code generation.
----------------
vzakhari wrote:

I am not sure I am following the comment.  "if the dummy is ranked" seems to contradict the previous condition that "dummy is an assumed rank".  Can you please clarify?

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


More information about the flang-commits mailing list