http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56459
Bug #: 56459
Summary: Wrongly rejects "TYPE(CHARACTER*1,)" (with comma)
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
On c.l.f., Ian Harvey pointed out that the Fortran 2008 standard allows the
following. Note the ",".
Cf. https://groups.google.com/d/topic/comp.lang.fortran/W2hWVhtHmlM/discussion
and http://mailman.j3-fortran.org/pipermail/j3/2013-February/006159.html
TYPE(CHARACTER*1) C0 ! Accepted
TYPE(CHARACTER*1,) C1 ! Wrongly rejected
TYPE(CHARACTER*1,) :: C2 ! Wrongly rejected
end
gfortran rejects it with Error: Unclassifiable statement
>From Fortran 2008:
R402 type-spec is intrinsic-type-spec
or derived-type-spec
R403 declaration-type-spec is intrinsic-type-spec
or TYPE ( intrinsic-type-spec )
or TYPE ( derived-type-spec )
or CLASS ( derived-type-spec )
or CLASS ( * )
R404 intrinsic-type-spec is INTEGER [ kind-selector ]
or REAL [ kind-selector ]
or DOUBLE PRECISION
or COMPLEX [ kind-selector ]
or CHARACTER [ char-selector ]
or LOGICAL [ kind-selector ]
R420 char-selector is length-selector
or ...
R421 length-selector is ( [ LEN = ] type-param-value )
or * char-length [ , ]