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/48351] [OOP]  Realloc on assignment fails if parent component is CLASS
Date: Wed, 30 Mar 2011 08:33:00 -0000	[thread overview]
Message-ID: <bug-48351-4-aeakajFA2E@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48351-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48351

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-03-30 08:04:13 UTC ---
trans-array.c's gfc_is_reallocatable_lhs fails at:

6859      /* All that can be left are allocatable components.  */
6860      if ((expr->symtree->n.sym->ts.type != BT_DERIVED
6861           && expr->symtree->n.sym->ts.type != BT_CLASS)
6862            || !expr->symtree->n.sym->ts.u.derived->attr.alloc_comp)
6863        return false;

The reason is that the CLASS wrapper does not set:

(gdb) p expr->symtree->n.sym->ts.u.derived->attr.alloc_comp
$3 = 0

Only the "_data" component has this value set for its type:

(gdb) p expr->symtree->n.sym->ts.u.derived->components->ts.u.derived->name
$12 = 0x2aaaaab42f98 "foo_t"
(gdb) p
expr->symtree->n.sym->ts.u.derived->components->ts.u.derived->attr.alloc_comp
$13 = 1


  reply	other threads:[~2011-03-30  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  6:51 [Bug fortran/48351] New: " burnus at gcc dot gnu.org
2011-03-30  8:33 ` burnus at gcc dot gnu.org [this message]
2011-03-30  8:39 ` [Bug fortran/48351] " burnus at gcc dot gnu.org
2011-07-07  2:34 ` townsend at astro dot wisc.edu
2012-01-13 20:58 ` pault at gcc dot gnu.org
2012-01-13 21:25 ` burnus at gcc dot gnu.org
2012-01-13 21:41 ` burnus 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-48351-4-aeakajFA2E@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).