http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46656
Summary: libgfortran: Integer write: uninitialised value Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: jvdeli...@gcc.gnu.org If I compile the following program using GCC 4.1 to 4.6 implicit none integer :: mylen = 5 print *, mylen end and run it under valgrind, I see: Conditional jump or move depends on uninitialised value(s) at 0x585A684: __GI_strlen (in /lib64/libc-2.11.2.so) by 0x4F06122: write_integer (write.c:1285) by 0x4F09B9E: _gfortrani_list_formatted_write (write.c:1553) by 0x40087F: MAIN__ (test.f90:3) by 0x4008C4: main (test.f90:4) Conditional jump or move depends on uninitialised value(s) at 0x4EFE146: _gfortrani_write_block (transfer.c:713) by 0x4F06136: write_integer (write.c:1289) by 0x4F09B9E: _gfortrani_list_formatted_write (write.c:1553) by 0x40087F: MAIN__ (test.f90:3) by 0x4008C4: main (test.f90:4) The first report is from: write_integer (st_parameter_dt *dtp, const char *source, int length) ... q = gfc_itoa (extract_int (source, length), itoa_buf, sizeof (itoa_buf)); ... digits = strlen (q); // <<< here