When I compile the program listed below I receive a spurious error message: test134.f90:2.11: 1 FORMAT(()) 1 Error: Unexpected element in format string at (1) PROGRAM test134 1 FORMAT(()) END
I believe this bug is invalid as the format string is invalid. NAG f95 also claims: *** Malformed format specification Reasoning: R1001 format-stmt is FORMAT format-specification R1002 format-specification is ( [ format-item-list ] ) Thus the question is whether "()" is a valid format-item(-list). R1003 format-item is [ r ] data-edit-desc or control-edit-desc or char-string-edit-desc or [ r ] ( format-item-list ) R1004 r is int-literal-constant I would claim that "()" is not - a data-edit-desc - a char-string-edit-desc It matches however, "( format-item-list )", but then I would claim that "" is not: - a data-edit-desc - a char-string-edit-desc - ( format-item-list )
Lahey reports this as a fatal syntax error. Checking file SOURCE.F90. Checking program unit TEST134 at line 1. Line 2, file SOURCE.F90 1 FORMAT(()) | | FATAL -- Essential LF90 requires that defined labels be referenced. FATAL -- Syntax error.
I verified Tobias' reading of the standard. Closing as invalid. Perhaps the error message could be more helpful.