From 2333b2bd640fdf9d191f983732d841b3c4458e68 Mon Sep 17 00:00:00 2001 From: tobi Date: Tue, 29 Jun 2004 17:21:37 +0000 Subject: fortran/ * module.c (mio_gmp_real): Correct writing of negative numbers. testsuite/ * gfortran.fortran-torture/execute/parameter_2.f90: New test. Also corrected dates in previous ChangeLog entries git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83862 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/module.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index eace654810a..cf8f453400a 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -2274,6 +2274,15 @@ mio_gmp_real (mpf_t * real) atom_string = gfc_getmem (strlen (p) + 20); sprintf (atom_string, "0.%s@%ld", p, exponent); + + /* Fix negative numbers. */ + if (atom_string[2] == '-') + { + atom_string[0] = '-'; + atom_string[1] = '0'; + atom_string[2] = '.'; + } + write_atom (ATOM_STRING, atom_string); gfc_free (atom_string); -- cgit v1.2.3