[flang-commits] [flang] [llvm] [flang-rt] enable IsNamelistNameOrSlash lookahead for scalar namelist items (PR #211224)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Fri Jul 31 02:25:51 PDT 2026
================
@@ -0,0 +1,35 @@
+! UNSUPPORTED: offload-cuda
+
+! Reads two NAMELIST records whose scalar LOGICAL item has an empty
+! assignment — first `l_flag=` with no spaces around the `=`, then
+! `l_flag = ` with surrounding whitespace — and checks that in both
+! cases l_flag keeps its .false. default while i_count picks up 7
+! from the following assignment. Covers the Flang NAMELIST
+! empty-scalar extension listed in flang/docs/Extensions.md.
+
+! RUN: %flang %isysroot -L"%libdir" %s -o %t
+! RUN: env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%libdir" %t | FileCheck %s
+
+! CHECK: l_flag=F
+! CHECK-NEXT: i_count=7
+! CHECK-NEXT: l_flag=F
+! CHECK-NEXT: i_count=7
+program p
+ implicit none
+ logical :: l_flag = .false.
----------------
ergawy wrote:
Done.
https://github.com/llvm/llvm-project/pull/211224
More information about the flang-commits
mailing list