Summary: | spurious error message when inner parentheses of a FORMAT statement are empty | ||
---|---|---|---|
Product: | gcc | Reporter: | Michael Richmond <michael.a.richmond> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | gcc-bugs, tobi |
Priority: | P3 | ||
Version: | 4.3.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Michael Richmond
2007-04-03 19:04:14 UTC
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. |