1 ! Like array_constructor_6.f90, but check constructors that apply
2 ! an elemental function to an array.
8 subroutine build (order
)
11 call test (order
, (/ (abs ((/ i
, -i
, -i
* 2 /)), i
= 1, order
) /))
12 call test (order
, abs ((/ ((/ -i
, -i
, i
* 2 /), i
= 1, order
) /)))
13 call test (order
, (/ abs ((/ ((/ i
, i
, -i
* 2 /), i
= 1, order
) /)) /))
16 subroutine test (order
, values
)
17 integer, dimension (3:) :: values
20 if (size (values
, dim
= 1) .ne
. order
* 3) STOP 1
22 if (values (i
* 3) .ne
. i
) STOP 2
23 if (values (i
* 3 + 1) .ne
. i
) STOP 3
24 if (values (i
* 3 + 2) .ne
. i
* 2) STOP 4