3 real, dimension(3,2) :: a
4 real, dimension(6) :: b
5 real, dimension(3) :: res1
6 real, dimension(:), allocatable
:: c1
, c2
,c3
7 real, dimension(2) :: res2
9 data a
/-2., 3., -5., 7., -11., 13./
10 data b
/17., -23., 29., -31., 37., -41./
11 data res1
/201., -320., 336./
12 data res2
/158., -353./
14 c1
= matmul(a
,[29.,37.])
15 if (size(c1
,1) /= 3) call abort
16 if (any(c1
/=res1
)) call abort
18 c2
= matmul(a
,pack(b
,[b
>20.]))
19 if (size(c1
,1) /= 3) call abort
20 if (any(c1
/=res1
)) call abort
22 c3
= matmul(pack(b
,[b
<0.]),a
)
23 if (size(c3
,1) /= 2) call abort
24 if (any(c3
/= res2
)) call abort