[Bug fortran/48746] [4.6/4.7 Regression] Matmul with allocate on assignment
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 30 11:16:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48746
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-04-30 11:12:29 UTC ---
Hi Paul,
the least I can do is to supply you with a more complete test case :-)
program main
implicit none
integer, parameter :: m=4, n=3, count=2
double precision :: a(m, count), b(count, n), c(m,n)
double precision, dimension(:,:), allocatable :: tmp
data a /1.d0, -2.d0, 4.d0, -8.d0, 16.d0, -32.d0, 64.d0, -128.d0/
data b /256.d0, -512.d0, 1024.d0, -2048.d0, 4096.d0, -8182.d0 /
data c/ -7936.d0, 15872.d0, -31744.d0, 63488.d0, -31744.d0, &
63488.d0,-126976.d0, 253952.d0,-126816.d0, 253632.d0, &
-507264.d0,1014528.d0/
tmp = matmul(a,b)
if (size(tmp,1) /= 4 .or. size(tmp,2) /= 3) call abort
if (any (tmp /= c)) call abort
end program main
More information about the Gcc-bugs
mailing list