This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gfortran, committed] Minor fix to module.c, was: [gfortran] PR 15481:Separate common symbols
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Jun 2004 20:57:46 +0200
- Subject: [gfortran, committed] Minor fix to module.c, was: [gfortran] PR 15481:Separate common symbols
- References: <40DD99B3.1010102@physik.uni-muenchen.de>
I committed the fix to module.c as appended. I also added a testcase.
- Tobi
Index: fortran/module.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/module.c,v
retrieving revision 1.6
diff -u -p -r1.6 module.c
--- fortran/module.c 9 Jun 2004 12:55:48 -0000 1.6
+++ fortran/module.c 29 Jun 2004 17:17:01 -0000
@@ -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);