2 ! PR 35995 - ifunction.m4 and ifunction_logical.m4 had a bug
3 ! where zero-sized arguments were not handled correctly.
4 ! Test case provided by Dick Hendrickson, amended by
14 SUBROUTINE GF0026(nf0
,nf1
)
16 INTEGER IDA(NF0
,9), iii(9)
18 lda
= (/ (i
/2*2 .eq
. I
, i
=1,9) /)
19 LDA
= ALL ( IDA
.NE
. -1000, 1)
20 if (.not
. all(lda
)) call abort
21 if (.not
. all(ida
.ne
. -1000)) call abort
23 lda
= (/ (i
/2*2 .eq
. I
, i
=1,9) /)
24 LDA
= any ( IDA
.NE
. -1000, 1)
25 print *, lda
!expect FALSE
26 if (any(lda
)) call abort
27 print *, any(ida
.ne
. -1000) !expect FALSE
28 if (any(ida
.ne
. -1000)) call abort
31 iii
= count ( IDA
.NE
. -1000, 1)
32 if (any(iii
/= 0)) call abort
33 if (count(ida
.ne
. -1000) /= 0) call abort
37 subroutine foo (nf0
, nf1
)
38 integer, dimension(9):: res
, iii
39 integer, dimension(nf0
,9) :: ida
40 res
= (/ (-i
, i
=1,9) /)
41 res
= product (ida
, 1)
42 if (any(res
/= 1)) call abort