http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48746
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.04.27 14:58:54 Ever Confirmed|0 |1 --- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-04-27 14:58:54 UTC --- (In reply to comment #1) > Problem here is that the return array "dtype" field is uninitialized when > lhs is (unallocated) allocatable. Due to this there are also similiar > problems in other intrinsics such as reshape(), etc... Interesting observation. This works: 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) allocate (tmp(3,3)) deallocate(tmp) tmp = matmul(a,b) end program main