This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/17941] New: gfortran: parser chokes on complex literal constant
- From: "anlauf at hep dot tu-darmstadt dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2004 20:33:09 -0000
- Subject: [Bug fortran/17941] New: gfortran: parser chokes on complex literal constant
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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