Skip to content

Commit 320a519

Browse files
authored
[flang] Accept OPEN(...,CONVERT="SWAP") in semantics (#79050)
The runtime implements CONVERT="SWAP", but semantics doesn't like it. Add it to the relevant table. Fixes llvm-test-suite/Fortran/gfortran/regression/record_marker_1.f90, .../unf_io_convert_1.f90, .../unf_io_convert_2.f90, and .../unf_io_convert_3.f90.
1 parent d0f44ed commit 320a519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Semantics/check-io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ void IoChecker::CheckStringValue(IoSpecKind specKind, const std::string &value,
918918
// Open values; Close values are {"DELETE", "KEEP"}.
919919
{"NEW", "OLD", "REPLACE", "SCRATCH", "UNKNOWN"}},
920920
{IoSpecKind::Carriagecontrol, {"LIST", "FORTRAN", "NONE"}},
921-
{IoSpecKind::Convert, {"BIG_ENDIAN", "LITTLE_ENDIAN", "NATIVE"}},
921+
{IoSpecKind::Convert, {"BIG_ENDIAN", "LITTLE_ENDIAN", "NATIVE", "SWAP"}},
922922
{IoSpecKind::Dispose, {"DELETE", "KEEP"}},
923923
};
924924
auto upper{Normalize(value)};

0 commit comments

Comments
 (0)