[flang-commits] [flang] [flang] Implement conditional expressions parser/semantics (F2023) (PR #186489)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Mar 30 20:04:15 PDT 2026


================
@@ -1193,6 +1210,12 @@ class IsContiguousHelper
 
   Result operator()(const NullPointer &) const { return true; }
 
+  template <typename T> Result operator()(const ConditionalExpr<T> &x) {
+    // Contiguity is not a meaningful characteristic of a conditional
+    // expression
+    return true;
----------------
eugeneepshteyn wrote:

Ok, I agree that it should be `true`.

Hmm, so `(cond ? a(1:10:2) : a(2:10:2))` must always create a contiguous temp. Let's make sure that it does, when we get to lowering.

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


More information about the flang-commits mailing list