OSDN Git Service

gcc/fortran:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / transfer_array_intrinsic_1.f90
1 ! { dg-do run }
2 ! Tests the patch to implement the array version of the TRANSFER
3 ! intrinsic (PR17298).
4
5 ! test the PR is fixed.
6
7    call test1 ()
8
9 contains
10
11    subroutine test1 ()
12      complex(4) :: z = (1.0, 2.0)
13      real(4) :: cmp(2), a(4, 4)
14      integer(2) :: it(4, 2, 4), jt(32)
15
16 ! The PR testcase.
17
18      cmp = transfer (z, cmp) * 2.0
19      if (any (cmp .ne. (/2.0, 4.0/))) call abort ()
20
21    end subroutine test1
22
23 end