public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17941] New: gfortran: parser chokes on complex literal constant
@ 2004-10-11 20:33 anlauf at hep dot tu-darmstadt dot de
  2004-10-11 20:51 ` [Bug fortran/17941] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: anlauf at hep dot tu-darmstadt dot de @ 2004-10-11 20:33 UTC (permalink / raw)
  To: gcc-bugs

Hi,

here's another problem, this time with "legacy f90" code:

program gfcbug17
  ! gfortran cannot parse this complex constant:
  complex, parameter :: c0 = (- 0.5, -0.5)
  print *, c0
end program gfcbug17

I get:


 In file gfcbug17.f90:3

  complex, parameter :: c0 = (- 0.5, -0.5)
                                  1
Error: Expected a right parenthesis in expression at (1)


Apparently the space between the "-" and 0.5 lets the parser choke.
Can the parsing rules be relaxed to accept the above form?

Cheers,
-ha

-- 
           Summary: gfortran: parser chokes on complex literal constant
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at hep dot tu-darmstadt dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2005-01-23 22:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-11 20:33 [Bug fortran/17941] New: gfortran: parser chokes on complex literal constant anlauf at hep dot tu-darmstadt dot de
2004-10-11 20:51 ` [Bug fortran/17941] " pinskia at gcc dot gnu dot org
2004-10-11 22:48 ` tobi at gcc dot gnu dot org
2004-10-12 21:37 ` tobi at gcc dot gnu dot org
2004-12-31  6:06 ` sgk at troutmask dot apl dot washington dot edu
2004-12-31  6:08 ` pinskia at gcc dot gnu dot org
2005-01-06 14:41 ` tobi at gcc dot gnu dot org
2005-01-15 11:09 ` pbrook at gcc dot gnu dot org
2005-01-15 20:34 ` sgk at troutmask dot apl dot washington dot edu
2005-01-15 22:27 ` sgk at troutmask dot apl dot washington dot edu
2005-01-22  1:33 ` sgk at troutmask dot apl dot washington dot edu
2005-01-23 22:29 ` cvs-commit at gcc dot gnu dot org
2005-01-23 22:38 ` pbrook at gcc dot gnu dot org
2005-01-23 22:39 ` pinskia at gcc dot gnu dot 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).