This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] | |
The attached patch fixes PR 17941. The attached program
is a test program suitable for inclusion in the gfortran
testsuite.
Briefly, gfortran could not deal with spaces between an
uniary plus/minus sign in a complex constant. That is,
"complex, parameter :: c = (- 1.0, + 2)" would invoke
an error.
This patch addresses 2 problems. First, the parsing of the
complex constant did not account for the space. Second,
mpfr_set_str() does not like spaces in its input string.
Bubblestrapped and regression tested on i386-*-freebsd6.0
2004-12-30 Steven G. Kargl <kargls@comcast.net>
* arith.c: Include stdlib.h and string.h
(gfc_convert_real): Use alloca and strlen; account for whitespace.
* primary.c (match_const_complex_part): Account for whitespace
2004-12-30 Steven G. Kargl <kargls@comcast.net>
* cmplx_constant.f90: new test case
--
Steve
Attachment:
pr17941.diff
Description: Text document
Attachment:
cmplx_constants.f90
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |