http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59781
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- The code in comment 3 gives 1 without valgrind error when compiled with gfortran 4.5.4. For 4.6 (r158252) and 4.7.3 valgrind gives ==69121== Conditional jump or move depends on uninitialised value(s) ==69121== at 0x1000E7CC5: gfc_itoa (in /opt/gcc/gcc4.6p/lib/libgfortran.3.dylib) ==69121== by 0x7FFF5FBFE89F: ??? ==69121== by 0x2: ??? and 4.8.2 and trunk gives ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x1000ED847: gfc_itoa (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== by 0x100000EB1: main (in ./a.out) ==69150== ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x1000ED84C: gfc_itoa (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== by 0x100000EB1: main (in ./a.out) ==69150== ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x1002D1AA1: __udivmodti4 (in /usr/lib/libSystem.B.dylib) ==69150== by 0x1002D1F9B: __umodti3 (in /usr/lib/libSystem.B.dylib) ==69150== ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x1002D1AA1: __udivmodti4 (in /usr/lib/libSystem.B.dylib) ==69150== by 0x1000ED88C: gfc_itoa (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x1000ED899: gfc_itoa (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x100012AF9: strlen (mc_replace_strmem.c:398) ==69150== by 0x1000ED95E: write_integer (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== by 0x100000EB1: main (in ./a.out) ==69150== ==69150== Conditional jump or move depends on uninitialised value(s) ==69150== at 0x100012B07: strlen (mc_replace_strmem.c:398) ==69150== by 0x1000ED95E: write_integer (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== by 0x100000EB1: main (in ./a.out) ==69150== ==69150== Syscall param write(buf) points to uninitialised byte(s) ==69150== at 0x1001A4272: write (in /usr/lib/libSystem.B.dylib) ==69150== by 0x1000EAA09: raw_write (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== by 0x10045075F: ??? ==69150== Address 0x100450ba8 is 8 bytes inside a block of size 512 alloc'd ==69150== at 0x100012679: malloc (vg_replace_malloc.c:266) ==69150== by 0x100020304: _gfortrani_xmalloc (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150== by 0x1FFFF: ??? ==69150== by 0x1000209AC: _gfortrani_fbuf_init (in /sw64/lib/gcc4.8/lib/libgfortran.3.dylib) ==69150==