We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5a4f73 commit aa77cf9Copy full SHA for aa77cf9
flang/runtime/format-implementation.h
@@ -434,6 +434,11 @@ DataEdit FormatControl<CONTEXT>::GetNextDataEdit(
434
} else if (edit.descriptor != DataEdit::DefinedDerivedType) {
435
edit.width = GetIntField(context);
436
}
437
+ if constexpr (std::is_base_of_v<InputStatementState, CONTEXT>) {
438
+ if (edit.width.value_or(-1) == 0) {
439
+ ReportBadFormat(context, "Input field width is zero", start);
440
+ }
441
442
if (edit.descriptor != DataEdit::DefinedDerivedType && PeekNext() == '.') {
443
++offset_;
444
edit.digits = GetIntField(context);
0 commit comments