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
This commit is contained in:
Tobias Schlüter 2004-06-29 19:21:37 +02:00 committed by Tobias Schlüter
parent 1c234fcb72
commit 78f2fb0858
4 changed files with 26 additions and 2 deletions

View File

@ -1,4 +1,8 @@
2004-06-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* module.c (mio_gmp_real): Correct writing of negative numbers.
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15963
* expr.c (check_intrinsic_op): Allow comparison of characters.

View File

@ -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);

View File

@ -1,4 +1,8 @@
2004-06-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.fortran-torture/execute/parameter_2.f90: New test.
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15963
* gfortran.fortran-torture/execute/initialization_1.f90: New test.

View File

@ -0,0 +1,7 @@
module m
parameter (p = -1.) ! negative numbers used to get output incorrectly
end module m
use m
if (p .ne. -1.) CALL abort()
end