| 1 |
! { dg-do run } |
| 2 |
program main |
| 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 |
| 8 |
|
| 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./ |
| 13 |
|
| 14 |
c1 = matmul(a,[29.,37.]) |
| 15 |
if (size(c1,1) /= 3) STOP 1 |
| 16 |
if (any(c1/=res1)) STOP 2 |
| 17 |
|
| 18 |
c2 = matmul(a,pack(b,[b>20.])) |
| 19 |
if (size(c1,1) /= 3) STOP 3 |
| 20 |
if (any(c1/=res1)) STOP 4 |
| 21 |
|
| 22 |
c3 = matmul(pack(b,[b<0.]),a) |
| 23 |
if (size(c3,1) /= 2) STOP 5 |
| 24 |
if (any(c3 /= res2)) STOP 6 |
| 25 |
|
| 26 |
end program main |