This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Apr 2011 21:58:20 +0200
- Subject: Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746
- References: <BANLkTimSKwoOz1X+YMUftGyfJLJoZpEG9A@mail.gmail.com>
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>