------- Comment #1 from burnus at gcc dot gnu dot org 2007-08-09 15:50 ------- Could you please tell us your gfortran version? ("gfortran -v", the gcc-version line is of most interest.)
Not that TRANSFER is free of bugs, but it produces here 4.3.0 20070808 (x86_64-unknown-linux-gnu) the same result as NAG f95. NAG f95 warns: Warning: a.f90, line 17: Intrinsic TRANSFER has partly undefined result Warning: a.f90, line 32: Intrinsic TRANSFER has partly undefined result If one runs valgrind on the a.out as produced by gfortran (-m64; no errors shown for -m32): ==21023== Conditional jump or move depends on uninitialised value(s) ==21023== at 0x4E3DD77: _gfortrani_gfc_itoa (error.c:138) ==21023== by 0x4EC0AA3: write_integer (write.c:1343) ==21023== by 0x4EC2BCA: _gfortrani_list_formatted_write (write.c:1541) ==21023== by 0x4EBA76A: _gfortran_transfer_array (transfer.c:1513) ==21023== by 0x40138E: MAIN__ (in /dev/shm/a.out) ==21023== by 0x4013DB: main (fmain.c:22) (and some more of these kind). [Actually, g95 has a similar valgrind output; for NAG f95, ifort and openf95 valgrind finds no error.] This PR could be related to PR 31610. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33037