public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/27470] New: [4.1 4.2 regression] wong memory allocator for derived types Date: Sun, 07 May 2006 09:41:00 -0000 [thread overview] Message-ID: <bug-27470-10391@http.gcc.gnu.org/bugzilla/> (raw) The following code TYPE foo INTEGER, DIMENSION(:), POINTER :: array END TYPE foo type(foo),allocatable,dimension(:) :: mol integer :: i, n n = 10 ALLOCATE (mol(n)) ALLOCATE (mol(1)%array(5)) END calls _gfortran_allocate_array for the second allocation, which is wrong and can lead to segfault. The problem is in gfc_array_allocate, where the check for expr->symtree->n.sym->attr.allocatable refers to mol, not to mol(1)%array. This one is tricky. -- Summary: [4.1 4.2 regression] wong memory allocator for derived types Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27470
next reply other threads:[~2006-05-07 9:41 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-05-07 9:41 tkoenig at gcc dot gnu dot org [this message] 2006-05-07 17:31 ` [Bug fortran/27470] [4.1/4.2 " pinskia at gcc dot gnu dot org 2006-05-07 19:36 ` tkoenig at gcc dot gnu dot org 2006-05-08 21:06 ` [Bug fortran/27470] [4.1/4.2 regression] wrong " tkoenig at gcc dot gnu dot org 2006-05-08 22:00 ` tkoenig at gcc dot gnu dot org 2006-05-08 22:11 ` tkoenig at gcc dot gnu dot org 2006-05-10 18:27 ` tkoenig at gcc dot gnu dot org 2006-05-14 22:35 ` mmitchel at gcc dot gnu dot org 2006-05-15 19:39 ` patchapp at dberlin dot org 2006-05-25 2:47 ` [Bug fortran/27470] [4.1 " mmitchel at gcc dot gnu dot org 2006-05-27 21:25 ` tkoenig at gcc dot gnu dot org 2006-05-28 12:33 ` tkoenig at gcc dot gnu dot org 2006-05-28 20:36 ` tkoenig at gcc dot gnu dot org 2006-05-28 20:37 ` tkoenig at gcc dot gnu dot org 2006-06-28 18:50 ` jjcogliati-r1 at yahoo dot com
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-27470-10391@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).