[flang-commits] [flang] [flang] Implement conditional expressions parser/semantics (F2023) (PR #186489)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Sun Mar 29 18:49:29 PDT 2026
================
@@ -0,0 +1,30 @@
+! RUN: %python %S/test_folding.py %s %flang_fc1
+! Tests folding of conditional expressions (Fortran 2023)
+module m
+ ! Basic scalar folding: constant condition selects the chosen branch.
----------------
eugeneepshteyn wrote:
What about cases `(.true. ? 10 : non_const)`, `(.false. ? 10 : non_const)`, `(.true. ? non_const : 10)`, and `(.false. ? non_const : 10)`?
Also, how do these look unparsed?
https://github.com/llvm/llvm-project/pull/186489
More information about the flang-commits
mailing list