1 ! Program to test the PRODUCT intrinsic
4 integer, dimension (3, 3) :: a
5 integer, dimension (3) :: b
6 logical, dimension (3, 3) :: m
8 a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/));
12 if (any(b .ne. (/6, 120, 504/))) call abort
14 if (product (a) .ne. 362880) call abort
21 if (any(b .ne. (/28, 40, 162/))) call abort
23 if (product (a, mask=m) .ne. 181440) call abort