[Bug fortran/38439] I/O PD edit descriptor inconsistency

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Mon Oct 12 07:39:00 GMT 2009



------- Comment #15 from dominiq at lps dot ens dot fr  2009-10-12 07:39 -------
The polyhedron test linpk.f90 now fails with:

[ibook-dhum] lin/test% linpk
     norm. resid      resid           machep         x(1)          x(n)
At line 38 of file linpk.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Comma required after P descriptor
(1P5d16.8)
   ^

Although this format is not explicitly allowed by F95, it is for F2003/2008:

F95 standard:

10.1.1 FORMAT statement

R1001 format-stmt is FORMAT format-specification

R1002 format-specification is ( [ format-item-list ] )

Constraint: The format-stmt shall be labeled.

Constraint: The comma used to separate format-items in a format-item-list
may be omitted as follows:

(1) Between a P edit descriptor and an immediately following F, E, EN, ES, D,
or G edit descriptor (10.6.5)

(2) Before a slash edit descriptor when the optional repeat specification is
not present (10.6.2)

(3) After a slash edit descriptor

(4) Before or after a colon edit descriptor (10.6.3)

F2003/2008 standard:

10.3 Form of a format item list

10.3.1 Syntax

R1003 format-items is format-item [ [ , ] format-item ] ...

R1004 format-item is [ r ] data-edit-desc
                  or control-edit-desc
                  or char-string-edit-desc
                  or [ r ] ( format-items )

R1005 unlimited-format-item is * ( format-items )

R1006 r is int-literal-constant

C1002 (R1003) The optional comma shall not be omitted except

  between a P edit descriptor and an immediately following F, E, EN, ES, D, or
G edit descriptor (10.8.5), 
  possibly preceded by a repeat specification,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  before a slash edit descriptor when the optional repeat speci cation does
  not appear (10.8.2), after a slash edit descriptor, or

  before or after a colon edit descriptor (10.8.3)

C1003 (R1006) r shall be positive.

C1004 (R1006) A kind parameter shall not be speci ed for r .

1 The integer literal constant r is called a repeat specification.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38439



More information about the Gcc-bugs mailing list