[flang-commits] [flang] [flang] Implement conditional expressions parser/semantics (F2023) (PR #186489)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Mon Mar 16 12:19:38 PDT 2026
================
@@ -92,6 +92,23 @@ class IsConstantExprHelper
!sym.attrs().test(semantics::Attr::VALUE)));
}
+ template <typename T>
+ bool operator()(const ConditionalExpr<T> &conditional) const {
+ // A conditional expression is constant if all its conditions and values are
+ // constant
----------------
klausler wrote:
`(.TRUE. ? 1 : x)` is constant even though `x` is not.
https://github.com/llvm/llvm-project/pull/186489
More information about the flang-commits
mailing list