------- Comment #6 from fxcoudert at gcc dot gnu dot org  2008-03-24 18:43 
-------
OK, I now can reproduce it. Here's a reduced testcase:

module TransferBug
  type ByteType
    integer(kind=1) :: singleByte
  end type
  type(ByteType) :: BytesPrototype(1)
contains
  function StringToBytes(v) result (bytes)
    character(len=2) :: v
    type (ByteType) :: bytes(size(transfer(v, BytesPrototype)))
    bytes = transfer('Hi', BytesPrototype)
  end function

  subroutine BytesToString(bytes, string)
    type (ByteType) :: bytes(2)
    character(len=*) :: string
    string = transfer(bytes, string)
  end subroutine
end module

program main
  use TransferBug
  character(len=3) :: str
  call BytesToString( StringToBytes('Hi'), str )
end program


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-24 18:43:13
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34955

Reply via email to