This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/48746] New: Matmul with allocate on assignment


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: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org
                CC: pault@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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]