This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/17941] New: gfortran: parser chokes on complex literal constant


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]