public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/42647] Missed initialization/dealloc of allocatable scalar DT with allocatable component
Date: Sat, 15 May 2010 22:29:00 -0000 [thread overview]
Message-ID: <20100515222909.12153.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42647-13404@http.gcc.gnu.org/bugzilla/>
------- Comment #8 from janus at gcc dot gnu dot org 2010-05-15 22:29 -------
(In reply to comment #7)
> For the automatic deallocation there is be a problem remaining:
>
> In comment #0, "a" itself is now automatically deallocated, but not "a%d" any
> more.
This is fixed by this patchlet (which is part of patch in comment #1):
Index: gcc/fortran/trans-decl.c
===================================================================
--- gcc/fortran/trans-decl.c (revision 159445)
+++ gcc/fortran/trans-decl.c (working copy)
@@ -3272,6 +3272,9 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, tr
gfc_se se;
stmtblock_t block;
+ if (sym_has_alloc_comp)
+ fnbody = gfc_trans_deferred_array (sym, fnbody);
+
e = gfc_lval_expr_from_sym (sym);
if (sym->ts.type == BT_CLASS)
gfc_add_component_ref (e, "$data");
Also the use-association issue still needs to be taken care of.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42647
next prev parent reply other threads:[~2010-05-15 22:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 16:04 [Bug fortran/42647] New: " burnus at gcc dot gnu dot org
2010-01-09 17:35 ` [Bug fortran/42647] " burnus at gcc dot gnu dot org
2010-01-09 21:29 ` burnus at gcc dot gnu dot org
2010-01-09 21:30 ` burnus at gcc dot gnu dot org
2010-01-10 15:37 ` dominiq at lps dot ens dot fr
2010-01-27 10:48 ` burnus at gcc dot gnu dot org
2010-05-15 21:25 ` dominiq at lps dot ens dot fr
2010-05-15 22:03 ` janus at gcc dot gnu dot org
2010-05-15 22:17 ` janus at gcc dot gnu dot org
2010-05-15 22:29 ` janus at gcc dot gnu dot org [this message]
2010-05-16 14:40 ` dominiq at lps dot ens dot fr
2010-09-02 14:49 ` dominiq at lps dot ens dot fr
[not found] <bug-42647-4@http.gcc.gnu.org/bugzilla/>
2010-10-13 13:22 ` 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=20100515222909.12153.qmail@sourceware.org \
--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).