public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46978] [4.6 Regression] TRANSPOSE with RESHAPE and ALLOCATE: Segfault Date: Thu, 16 Dec 2010 21:32:00 -0000 [thread overview] Message-ID: <bug-46978-4-7MmHoDmnv0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-46978-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46978 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikael at gcc dot gnu.org Summary|[4.6 Regression] TRANSPOSE |[4.6 Regression] TRANSPOSE |corrupts structure and |with RESHAPE and ALLOCATE: |memory |Segfault --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-16 21:31:43 UTC --- Further reduced test case. The ALLOCATE of A with a non-constant bound and a RESHAPE with a non-constant bound are crucial ingredients - as is the TRANSFER. (The purpose of "TWO" is to make the dump a tad more readable.) Works: 2010-09-09-r164046 Fails: 2010-09-28-r164677 Thus, a good candidate would be the TRANSFER rewriting patch for PR 45648. The program crashes with: *** glibc detected *** ./a.out: free(): invalid pointer: 0x0000000000604040 *** program elastic2 implicit none real, allocatable, dimension(:,:) :: coor real, allocatable, dimension(:) :: a integer :: nno nno = 3 allocate(a(2*nno)) call two() coor = transpose ( reshape ( a, (/2,nno/) ) ) contains subroutine two() allocate(coor(3,2)) coor = 99 a = 12 end subroutine end program elastic2
next prev parent reply other threads:[~2010-12-16 21:32 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-16 9:10 [Bug fortran/46978] New: TRANSPOSE corrupts structure and memory m.a.hulsen at tue dot nl 2010-12-16 10:20 ` [Bug fortran/46978] " dominiq at lps dot ens.fr 2010-12-16 10:33 ` m.a.hulsen at tue dot nl 2010-12-16 11:21 ` [Bug fortran/46978] [4.6 Regression] " burnus at gcc dot gnu.org 2010-12-16 14:49 ` burnus at gcc dot gnu.org 2010-12-16 15:27 ` jakub at gcc dot gnu.org 2010-12-16 21:32 ` burnus at gcc dot gnu.org [this message] 2010-12-17 19:28 ` [Bug fortran/46978] [4.6 Regression] TRANSPOSE with RESHAPE and ALLOCATE: Segfault mikael at gcc dot gnu.org 2010-12-19 15:47 ` mikael at gcc dot gnu.org 2010-12-20 23:25 ` mikael at gcc dot gnu.org 2010-12-20 23:29 ` mikael at gcc dot gnu.org 2010-12-22 12:37 ` mikael at gcc dot gnu.org 2010-12-23 9:13 ` m.a.hulsen at tue dot nl 2010-12-23 13:36 ` mikael at gcc dot gnu.org 2010-12-23 13:39 ` mikael at gcc dot gnu.org 2010-12-23 13:43 ` mikael at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-46978-4-7MmHoDmnv0@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).