This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran, committed] Minor fix to module.c, was: [gfortran] PR 15481:Separate common symbols


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]