diff --git a/flang/runtime/format-implementation.h b/flang/runtime/format-implementation.h index 74254bebe6e7a..46204ca927c13 100644 --- a/flang/runtime/format-implementation.h +++ b/flang/runtime/format-implementation.h @@ -443,8 +443,9 @@ RT_API_ATTRS int FormatControl::CueUpNextDataEdit( if (ch != 'P') { // 1PE5.2 - comma not required (C1302) CharType peek{Capitalize(PeekNext())}; if (peek >= 'A' && peek <= 'Z') { - if (ch == 'A' /* anticipate F'202X AT editing */ || ch == 'B' || - ch == 'D' || ch == 'E' || ch == 'R' || ch == 'S' || ch == 'T') { + if ((ch == 'A' && peek == 'T' /* anticipate F'202X AT editing */) || + ch == 'B' || ch == 'D' || ch == 'E' || ch == 'R' || ch == 'S' || + ch == 'T') { // Assume a two-letter edit descriptor next = peek; ++offset_;