public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48360] [4.6/4.7 Regression] ICE on array assignment statement with allocatable LHS Date: Fri, 08 Apr 2011 04:17:00 -0000 [thread overview] Message-ID: <bug-48360-4-wHtatmE5yH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-48360-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48360 Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011.04.08 04:16:46 Ever Confirmed|0 |1 --- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> 2011-04-08 04:16:46 UTC --- This is obviously mine :-) This fixes it but I suspect that a few more conditions (no ARRAY_ELEMENT for example) will be needed for it to be correct. Index: gcc/fortran/trans-array.c =================================================================== *** gcc/fortran/trans-array.c (revision 171573) --- gcc/fortran/trans-array.c (working copy) *************** get_std_lbound (gfc_expr *expr, tree des *** 6707,6712 **** --- 6707,6713 ---- tree stride; tree cond, cond1, cond3, cond4; tree tmp; + gfc_ref *ref; if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc))) { tmp = gfc_rank_cst[dim]; *************** get_std_lbound (gfc_expr *expr, tree des *** 6740,6745 **** --- 6741,6752 ---- else if (expr->expr_type == EXPR_VARIABLE) { tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl); + for (ref = expr->ref; ref; ref = ref->next) + { + if (ref->type == REF_COMPONENT + && ref->u.c.component->as) + tmp = TREE_TYPE (ref->u.c.component->backend_decl); + } return GFC_TYPE_ARRAY_LBOUND(tmp, dim); } else if (expr->expr_type == EXPR_FUNCTION) Paul
next prev parent reply other threads:[~2011-04-08 4:17 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-30 11:20 [Bug fortran/48360] New: " krefson at googlemail dot com 2011-03-30 12:39 ` [Bug fortran/48360] [4.6/4.7 Regression] " burnus at gcc dot gnu.org 2011-03-31 10:39 ` jakub at gcc dot gnu.org 2011-03-31 13:25 ` jvdelisle at gcc dot gnu.org 2011-03-31 13:37 ` jvdelisle at gcc dot gnu.org 2011-04-01 17:54 ` jvdelisle at gcc dot gnu.org 2011-04-08 4:17 ` pault at gcc dot gnu.org [this message] 2011-04-12 19:15 ` pault at gcc dot gnu.org 2011-04-13 18:38 ` pault at gcc dot gnu.org 2011-04-13 19:20 ` pault 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-48360-4-wHtatmE5yH@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).