------- Comment #2 from burnus at gcc dot gnu dot org 2006-11-23 11:17 ------- Confirmed. For "transfer(string, integer)", gfortran's transfer only uses the first character (byte). It should use all characters.
-fdump-tree-original: value = VIEW_CONVERT_EXPR<int4>(byte_string[1]{lb: 1 sz: 1}); In iresolve.c gfortran only checks whether the source is scalar or an array, the transfer is then done in gfc_conv_intrinsic_transfer (scalar) or gfc_conv_intrinsic_array_transfer in trans-intrinsic.c. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2006-11-23 11:17:09 date| | Summary|incorrect conversion from |incorrect conversion from |string to integer by |string to integer by |convert() |TRANSFER() http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29951