1! { dg-do compile } 2program matmul_bounds_1 3 implicit none 4 real, dimension(3,2) :: a 5 real, dimension(2,3) :: b 6 real, dimension(3,2) :: rab 7 real, dimension(2,2) :: rok 8 real, dimension(2) :: rv 9 real, dimension(3) :: rw 10 real, dimension(3) :: x 11 real, dimension(2) :: y 12 a = 1 13 b = 2 14 x = 3 15 y = 4 16 ! These tests should throw an error 17 rab = matmul(a,b) ! { dg-error "Different shape" } 18 rv = matmul(a,y) ! { dg-error "Different shape" } 19 rv = matmul(x,b) ! { dg-error "Different shape" } 20 ! These are ok. 21 rw = matmul(a,y) 22 rv = matmul(x,a) 23 rok = matmul(b,a) 24end program matmul_bounds_1 25 26