aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c9
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);