This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46978] [4.6 Regression] TRANSPOSE corrupts structure and memory
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Dec 2010 14:49:04 +0000
- Subject: [Bug fortran/46978] [4.6 Regression] TRANSPOSE corrupts structure and memory
- Auto-submitted: auto-generated
- References: <bug-46978-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46978
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-16 14:48:53 UTC ---
Reduced test case:
program elastic2
implicit none
type mesh_t
real, allocatable, dimension(:,:) :: coor
end type mesh_t
type(mesh_t) :: mesh3
real, allocatable, dimension(:) :: a
integer :: nno
nno = 13
call two(mesh3, nno)
allocate(a(2*nno))
a = 1
mesh3%coor = transpose ( reshape ( a, (/2,nno/) ) )
contains
subroutine two(x,nno)
type(mesh_t) :: x
integer :: nno
allocate(x%coor(nno,2))
x%coor = 99
end subroutine
end program elastic2