diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-06-29 19:21:37 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-06-29 19:21:37 +0200 |
commit | 78f2fb0858ad3af16b46c5b064c846a8528eb814 (patch) | |
tree | 5d68521be0b665c281d88ac82cafba38b8df1886 /gcc/fortran/module.c | |
parent | 1c234fcb7273f09aa3cb32274c58e7c2ed0abcb3 (diff) | |
download | gcc-78f2fb0858ad3af16b46c5b064c846a8528eb814.zip gcc-78f2fb0858ad3af16b46c5b064c846a8528eb814.tar.gz gcc-78f2fb0858ad3af16b46c5b064c846a8528eb814.tar.bz2 |
module.c (mio_gmp_real): Correct writing of negative numbers.
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
From-SVN: r83862
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index eace654..cf8f453 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); |