http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48746
Summary: Matmul with allocate on assignment Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: tkoe...@gcc.gnu.org CC: pa...@gcc.gnu.org The following program crashes with a double free on current trunk: program main implicit none integer, parameter :: m=10, n=12, count=4 double precision :: optmatmul(m, n) 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) end program main Paul, if you happen to have any idea...