------- Comment #9 from jvdelisle at gcc dot gnu dot org  2008-12-13 16:28 
-------
I have isolated the problem to gfc_itoa.  gfc_itoa returns a string. The number
of digits is determined from the strlen of that string.  At -m32, that string
length (digits, see below) is off by one. I instrumented write_decimal in
write.c to see this.  I now will dig into gfc_itoa.

$ gfc -m64 pr38504.f90
$ ./a.out 
sign=1
w=22, m=-1, digits=19, nsign=1
  -9223372036854775808
$ gfc -m32 pr38504.f90 
$ ./a.out 
sign=1
w=22, m=-1, digits=20, nsign=1
 --9223372036854775808


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-12-12 13:55:55         |2008-12-13 16:28:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38504

Reply via email to