public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55314] [4.6/4.7/4.8 Regression] Rejects some valid ALLOCATE statements Date: Tue, 13 Nov 2012 22:59:00 -0000 [thread overview] Message-ID: <bug-55314-4-rf8Eg15G9o@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55314-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55314 --- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-11-13 22:59:22 UTC --- Here's a tentative patch: Index: resolve.c =================================================================== --- resolve.c (Revision 192894) +++ resolve.c (Arbeitskopie) @@ -7618,12 +7618,18 @@ resolve_allocate_deallocate (gfc_code *code, const if (pr->next && qr->next) { + int i; gfc_array_ref *par = &(pr->u.ar); gfc_array_ref *qar = &(qr->u.ar); - if ((par->start[0] != NULL || qar->start[0] != NULL) - && gfc_dep_compare_expr (par->start[0], - qar->start[0]) != 0) - break; + + for (i=0; i<par->dimen; i++) + { + if ((par->start[i] != NULL + || qar->start[i] != NULL) + && gfc_dep_compare_expr (par->start[i], + qar->start[i]) != 0) + goto break_label; + } } } else @@ -7635,6 +7641,8 @@ resolve_allocate_deallocate (gfc_code *code, const pr = pr->next; qr = qr->next; } + break_label: + ; } } }
next prev parent reply other threads:[~2012-11-13 22:59 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-13 22:35 [Bug fortran/55314] New: " tkoenig at gcc dot gnu.org 2012-11-13 22:39 ` [Bug fortran/55314] " tkoenig at gcc dot gnu.org 2012-11-13 22:59 ` tkoenig at gcc dot gnu.org [this message] 2012-11-20 12:29 ` jakub at gcc dot gnu.org 2012-11-24 15:00 ` tkoenig at gcc dot gnu.org 2012-11-24 17:13 ` tkoenig at gcc dot gnu.org 2012-11-24 22:17 ` tkoenig at gcc dot gnu.org 2012-11-24 22:20 ` tkoenig 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-55314-4-rf8Eg15G9o@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).