mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 15:26:41 +00:00

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.
9 lines
253 B
Fortran
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
|