Index: flang/include/flang/Common/format.h =================================================================== --- flang/include/flang/Common/format.h +++ flang/include/flang/Common/format.h @@ -606,8 +606,8 @@ check_e(); } } else if (token_.kind() == TokenKind::Point && check_d() && - token_.kind() == TokenKind::E) { - ReportError("Unexpected 'e' in 'G0' edit descriptor"); // C1308 + token_.kind() == TokenKind::E) { // C1308 + ReportError("A 'G0' edit descriptor must not have an 'e' value"); NextToken(); if (token_.kind() == TokenKind::UnsignedInteger) { NextToken(); Index: flang/test/Semantics/io07.f90 =================================================================== --- flang/test/Semantics/io07.f90 +++ flang/test/Semantics/io07.f90 @@ -74,9 +74,9 @@ 8001 format(9G0.5) - !ERROR: Unexpected 'e' in 'G0' edit descriptor + !ERROR: A 'G0' edit descriptor must not have an 'e' value 8101 format(9(G0.5e1)) - !ERROR: Unexpected 'e' in 'G0' edit descriptor + !ERROR: A 'G0' edit descriptor must not have an 'e' value 8102 format(9(G0.5 E 1)) end Index: flang/test/Semantics/io08.f90 =================================================================== --- flang/test/Semantics/io08.f90 +++ flang/test/Semantics/io08.f90 @@ -189,10 +189,10 @@ !ERROR: Expected 'G' edit descriptor '.d' value write(*,'(G4)') - !ERROR: Unexpected 'e' in 'G0' edit descriptor + !ERROR: A 'G0' edit descriptor must not have an 'e' value write(*,'(G0.8e)') - !ERROR: Unexpected 'e' in 'G0' edit descriptor + !ERROR: A 'G0' edit descriptor must not have an 'e' value write(*,'(G0.8e2)') !ERROR: Kind parameter '_' character in format expression