The following program CHARACTER(LEN=80) DATA DATA="" OPEN(121245,FILE="/proc/self/statm",ACTION="READ",STATUS="OLD",ACCESS="STREAM") DO I=1,80 READ(121245,END=999) DATA(I:I) ENDDO 999 CLOSE(121245) DATA(I:80)="" END
under valgrind leads to : ==29139== Conditional jump or move depends on uninitialised value(s) ==29139== at 0x4BE48A5: finalize_transfer (transfer.c:2953) ==29139== by 0x4BE49E8: _gfortran_st_read_done (transfer.c:3092) ==29139== by 0x400A2B: MAIN__ (test.f90:5) ==29139== by 0x400B19: main (fmain.c:21) which I'm guessing would be a wrong code issue in the io lib. gcc version 4.4.0 20090414 (prerelease) [gcc-4_4-branch revision 146034] (GCC) -- Summary: IO depends on uninitialised value Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39782