This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/29951] incorrect conversion from string to integer by TRANSFER()



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]