OSDN Git Service

Merge tree-ssa-20020619-branch into mainline.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_merge.f90
1 ! Program to test the MERGE intrinsic
2 program intrinsic_merge
3    integer, dimension(3) :: a, b
4    integer i
5
6    a = (/-1, 2, 3/)
7
8    i = 5
9    if (merge (-1, 1, i .gt. 3) .ne. -1) call abort
10    i = 1
11    if (merge (-1, 1, i .ge. 3) .ne. 1) call abort
12
13    b = merge(a, 0, a .ge. 0)
14    if (any (b .ne. (/0, 2, 3/))) call abort
15 end program