Peter Klausler a70ffe784d
[flang] Support "PRINT namelistname" (#112024)
Nearly every Fortran compiler supports "PRINT namelistname" as a synonym
for "WRITE (*, NML=namelistname)". Implement this extension via parse
tree rewriting.

Fixes https://github.com/llvm/llvm-project/issues/111738.
2024-10-15 14:22:22 -07:00

9 lines
253 B
Fortran

!RUN: %flang_fc1 -fdebug-unparse -pedantic %s 2>&1 | FileCheck %s
!Test rewrite of "PRINT namelistname" into "WRITE(*,NML=namelistname)"
!CHECK: nonstandard: namelist in PRINT statement
namelist /nml/x
x = 123.
!CHECK: WRITE (*, NML=nml)
print nml
end