Skip to content

Commit

Permalink
[flang] Correct a typo when parsing format token white space
Browse files Browse the repository at this point in the history
A format such as "( D   C, X6. 2  )" is parsed the same as "(DC,X6.2)".
  • Loading branch information
vdonaldson committed Mar 31, 2022
1 parent 14cad95 commit 09b1a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flang/include/flang/Common/format.h
Expand Up @@ -172,7 +172,7 @@ template <typename CHAR> CHAR FormatValidator<CHAR>::NextChar() {

template <typename CHAR> CHAR FormatValidator<CHAR>::LookAheadChar() {
for (laCursor_ = cursor_ + 1; laCursor_ < end_; ++laCursor_) {
if (!IsWhite(*cursor_)) {
if (!IsWhite(*laCursor_)) {
return toupper(*laCursor_);
}
}
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Semantics/io07.f90
Expand Up @@ -5,8 +5,8 @@
format(A)

2001 format(3I8, 3Z8)
2002 format(3I8, Z8)
2003 format( 3 I 8 , 3 Z 8 )
2002 format(DC, F8.2, 3I8, Z8)
2003 format( D C , F 8 . 2 , 3 I 8 , 3 Z 8 )
2004 format(20PF10.2)
2005 format(20P,F10.2)
2006 format(20P7F10.2)
Expand Down

0 comments on commit 09b1a6d

Please sign in to comment.