public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56459] New: Wrongly rejects "TYPE(CHARACTER*1,)"  (with comma)
@ 2013-02-26 14:21 burnus at gcc dot gnu.org
  2013-02-27 13:55 ` [Bug fortran/56459] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-02-26 14:21 UTC (permalink / raw)
  To: gcc-bugs


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: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


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 [ , ]


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-16  8:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 14:21 [Bug fortran/56459] New: Wrongly rejects "TYPE(CHARACTER*1,)" (with comma) burnus at gcc dot gnu.org
2013-02-27 13:55 ` [Bug fortran/56459] " burnus at gcc dot gnu.org
2014-12-16  4:01 ` ian_harvey at bigpond dot com
2014-12-16  8:52 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).