diff options
author | Peter Klausler <35819229+klausler@users.noreply.github.com> | 2023-11-30 12:51:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 12:51:56 -0800 |
commit | c13f7e17409b6fed29696c2bbe59efc3af3a408b (patch) | |
tree | 784209b38af293846213460399588fd25f4ee212 /flang/unittests | |
parent | 13386c608e6d571d2d91eea5f7c8fb6911d6dcfb (diff) | |
download | llvm-c13f7e17409b6fed29696c2bbe59efc3af3a408b.zip llvm-c13f7e17409b6fed29696c2bbe59efc3af3a408b.tar.gz llvm-c13f7e17409b6fed29696c2bbe59efc3af3a408b.tar.bz2 |
[flang][runtime] Allow already-documented missing 'w' on edit descriptor (#72901)
As already documented in flang/docs/Extensions.md and implemented in the
compilation-time format validator, we want to support at execution time
the Intel (and presumably also Fujitsu) extension of allowing a missing
width on an edit descriptor in a formatted I/O statement.
Fixes https://github.com/llvm/llvm-project/issues/72597.
Diffstat (limited to 'flang/unittests')
-rw-r--r-- | flang/unittests/Runtime/Format.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/flang/unittests/Runtime/Format.cpp b/flang/unittests/Runtime/Format.cpp index e9004b7..01803c6 100644 --- a/flang/unittests/Runtime/Format.cpp +++ b/flang/unittests/Runtime/Format.cpp @@ -111,6 +111,7 @@ TEST(FormatTests, FormatStringTraversal) { ResultsTy{"I4", "E10.1", "E10.1", "/", "I4", "E10.1", "E10.1", "/", "I4", "E10.1", "E10.1"}, 1}, + {1, "(F)", ResultsTy{"F"}, 1}, // missing 'w' }; for (const auto &[n, format, expect, repeat] : params) { @@ -170,7 +171,7 @@ TEST(InvalidFormatFailure, MissingPrecision) { R"(Invalid FORMAT: integer expected at '\)')"); } -TEST(InvalidFormatFailure, MissingFormatWidth) { +TEST(InvalidFormatFailure, MissingFormatWidthWithDigits) { static constexpr const char *format{"(F.9)"}; static constexpr int repeat{1}; |