[flang-commits] [flang] [flang] Create temporaries for array sections passed to IGNORE_TKR dummy args (PR #147419)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Tue Jul 8 11:56:59 PDT 2025


================
@@ -170,7 +170,7 @@ class CallInterface {
     /// Is the argument INTENT(OUT)
     bool isIntentOut() const;
     /// Does the argument have the CONTIGUOUS attribute or have explicit shape?
-    bool mustBeMadeContiguous() const;
+    bool mustBeMadeContiguous(const bool argHasTriplet = false) const;
----------------
eugeneepshteyn wrote:

Why "never"? Maybe I just want to make it obvious that the arg shouldn't be modified:
```
void f(const bool x = false)
{
  x = true;
}

$ clang++ -c const.cpp
const.cpp:3:5: error: cannot assign to variable 'x' with const-qualified type 'const bool'
    3 |   x = true;
      |   ~ ^
const.cpp:1:19: note: variable 'x' declared const here
    1 | void f(const bool x = false)
      |        ~~~~~~~~~~~^~~~~~~~~
1 error generated.
```
In any case, this is not important to my change, so I can remove it.

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


More information about the flang-commits mailing list