mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-18 14:30:42 +08:00
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:
parent
1c234fcb72
commit
78f2fb0858
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user