2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / transfer_intrinsic_1.f90
blob73a7e7724f5b08c790a53625e994afd57f2aeb2d
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! Check the fix for PR34955 in which three bytes would be copied
5 ! from bytes by TRANSFER, instead of the required two.
7 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
9 subroutine BytesToString(bytes, string)
10 type ByteType
11 integer(kind=1) :: singleByte
12 end type
13 type (ByteType) :: bytes(2)
14 character(len=*) :: string
15 string = transfer(bytes, string)
16 end subroutine
17 ! { dg-final { scan-tree-dump-times "MIN_EXPR" 2 "original" } }