1! { dg-do run }
2! { dg-shouldfail "dimension of array B incorrect in MATMUL intrinsic" }
3program main
4  real, dimension(:,:), allocatable :: a
5  real, dimension(:), allocatable :: b
6  allocate (a(2,2), b(3))
7  call random_number(a)
8  call random_number(b)
9  print *,matmul(a,b)
10end program main
11! { dg-output "Fortran runtime error: dimension of array B incorrect in MATMUL intrinsic.*" }
12