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/48360] [4.6/4.7 Regression] ICE on array assignment statement with allocatable LHS
Date: Wed, 30 Mar 2011 12:39:00 -0000	[thread overview]
Message-ID: <bug-48360-4-yrsWdPmJqa@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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |pault at gcc dot gnu.org
   Target Milestone|---                         |4.6.1
            Summary|ICE on array assignment     |[4.6/4.7 Regression] ICE on
                   |statement with allocatable  |array assignment statement
                   |LHS                         |with allocatable LHS

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-03-30 11:55:51 UTC ---
(In reply to comment #0)
> Disabling the possibility of "allocate-on-assignment" by changing
[...]

Or simply use: -fno-realloc-lhs


With my - admittedly not clean - tree, that gives the following valgrind
output:

Invalid read of size 8
    at 0x56B13A: get_std_lbound (trans-array.c:6825)
    by 0x573E88: gfc_alloc_allocatable_for_assignment (trans-array.c:7083)
    by 0x58EBDB: gfc_trans_assignment_1 (trans-expr.c:6186)

That's the lines:

6822      else if (expr->expr_type == EXPR_VARIABLE)
6823        {
6824          tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl);
6825          return GFC_TYPE_ARRAY_LBOUND(tmp, dim);

The issue is that
  TYPE_LANG_SPECIFIC (tmp) == tmp->type.lang_specific == NULL
and, thus, accessing TYPE_LANG_SPECIFIC(node)->lbound[dim]  gives an ICE.

The issue is that for "mmv%h0" the proper backend is not:
  expr->symtree->n.sym->backend_decl
but rather
  expr->ref->u.c->component->backend_decl


  reply	other threads:[~2011-03-30 11:56 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 ` burnus at gcc dot gnu.org [this message]
2011-03-31 10:39 ` [Bug fortran/48360] [4.6/4.7 Regression] " 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
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-yrsWdPmJqa@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: link
Be 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).