gcc/testsuite/gfortran.dg/matmul_bounds_12.f90
raw| 1 | ! { dg-do run } |
| 2 | program main |
| 3 | real, dimension(3,2) :: a |
| 4 | real, dimension(3) :: bp |
| 5 | real, dimension(3) :: res1 |
| 6 | real, dimension(:), allocatable :: c3 |
| 7 | real, dimension(2) :: res2 |
| 8 | |
| 9 | data a /-2., 3., -5., 7., -11., 13./ |
| 10 | data bp /-23., -31., -41./ |
| 11 | data res2 /158., -353./ |
| 12 | |
| 13 | c3 = matmul(bp,a) |
| 14 | if (size(c3,1) /= 2) STOP 1 |
| 15 | if (any(c3 /= res2)) STOP 2 |
| 16 | |
| 17 | end program main |