]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/fortran/primary.cc
re PR fortran/17941 (gfortran: parser chokes on complex literal constant)
authorPaul Brook <pbrook@gcc.gnu.org>
Sun, 23 Jan 2005 22:29:41 +0000 (22:29 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Sun, 23 Jan 2005 22:29:41 +0000 (22:29 +0000)
commit69029c61aa94cec4fb273dcfc7693f754d9b4452
tree482560991382bf4a800f1c23734d475bd99bc65d
parent708bde14eaf5568ecc2fdb23a4cb15762f117f7c
re PR fortran/17941 (gfortran: parser chokes on complex literal constant)

2004-01-23  Paul Brook  <paul@codesourcery.com>
Steven G. Kargl  <kargls@comcast.net>

PR fortran/17941
* arith.c (gfc_convert_real): Remove sign handling.
* primary.c (match_digits): Allow whitespace after initial sign.
(match_real_const): Handle signs here.  Allow whitespace after
initial sign.  Remove dead code.
(match_const_complex_part): Remove.
(match_complex_part): Use match_{real,integer}_const.
(match_complex_constant): Cross-promote integer types.
testsuite/
* gfortran.dg/real_const_1.f: New test.
* gfortran.dg/real_const_2.f90: New test.
* gfortran.dg/complex_int_1.f90: New test.

From-SVN: r94127
gcc/fortran/ChangeLog
gcc/fortran/arith.c
gcc/fortran/primary.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/complex_int_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/real_const_1.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/real_const_2.f90 [new file with mode: 0644]