Hello Paul, there's another point: The sizes are also not set correctly.
ig25@linux-fd1f:~/Krempel/H> cat mm.f90 program main implicit none integer, parameter :: m=10, n=12, count=4 double precision :: a(m, count), b(count, n), c(m, n) double precision, dimension(:,:), allocatable :: tmp call random_number(a) call random_number(b) tmp = matmul(a,b) print *,size(tmp,1) print *,size(tmp,2) end program main ig25@linux-fd1f:~/Krempel/H> gfortran mm.f90 ig25@linux-fd1f:~/Krempel/H> ./a.out 1 1 ig25@linux-fd1f:~/Krempel/H>