diff options
| author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 17:21:37 +0000 |
|---|---|---|
| committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 17:21:37 +0000 |
| commit | 2333b2bd640fdf9d191f983732d841b3c4458e68 (patch) | |
| tree | 5d68521be0b665c281d88ac82cafba38b8df1886 /gcc/fortran/module.c | |
| parent | 8b908ec496266378bdf41190e067b6e863bc9cd0 (diff) | |
| download | ppe42-gcc-2333b2bd640fdf9d191f983732d841b3c4458e68.tar.gz ppe42-gcc-2333b2bd640fdf9d191f983732d841b3c4458e68.zip | |
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
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 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); |

