public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39879] [4.3/4.4/4.5 Regression] double free or corruption abort with gfortran
Date: Sun, 26 Apr 2009 19:22:00 -0000 [thread overview]
Message-ID: <20090426192200.4959.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39879-17588@http.gcc.gnu.org/bugzilla/>
------- Comment #9 from pault at gcc dot gnu dot org 2009-04-26 19:22 -------
(In reply to comment #8)
> I have an "obvious" (ie. after three hours staring at it:-( ) fix that is
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 146772)
+++ gcc/fortran/resolve.c (working copy)
@@ -6645,7 +6645,8 @@
if (rhs->expr_type == EXPR_VARIABLE
&& rhs->symtree->n.sym->ts.type == BT_DERIVED
&& has_default_initializer (rhs->symtree->n.sym->ts.derived)
- && (lhs->symtree->n.sym == rhs->symtree->n.sym))
+ && (lhs->symtree->n.sym == rhs->symtree->n.sym)
+ && !(rhs->ref || lhs->ref))
code->ext.actual->next->expr = gfc_get_parentheses (rhs);
return true;
which regtests OK but I need a day or so to dwell on. Although the above is my
doing, I do not recall for the life of me why a temporary had to be added in
this case. I will attempt to recall that and figure out exactly which cases
are counter-indicated.
By the way, David, thanks for the report!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39879
next prev parent reply other threads:[~2009-04-26 19:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 6:35 [Bug fortran/39879] New: " david dot sagan at gmail dot com
2009-04-24 6:36 ` [Bug fortran/39879] " david dot sagan at gmail dot com
2009-04-24 8:55 ` dominiq at lps dot ens dot fr
2009-04-24 13:06 ` david dot sagan at gmail dot com
2009-04-24 14:17 ` kargl at gcc dot gnu dot org
2009-04-24 14:27 ` david dot sagan at gmail dot com
2009-04-24 17:59 ` kargl at gcc dot gnu dot org
2009-04-24 18:00 ` kargl at gcc dot gnu dot org
2009-04-24 22:03 ` [Bug fortran/39879] [4.3/4.4/4.5 Regression] " burnus at gcc dot gnu dot org
2009-04-25 18:06 ` pault at gcc dot gnu dot org
2009-04-26 16:50 ` pault at gcc dot gnu dot org
2009-04-26 19:22 ` pault at gcc dot gnu dot org [this message]
2009-04-28 5:16 ` pault at gcc dot gnu dot org
2009-04-28 5:30 ` pault at gcc dot gnu dot org
2009-04-28 6:07 ` [Bug fortran/39879] [4.3/4.4 " pault at gcc dot gnu dot org
2009-05-10 10:44 ` pault at gcc dot gnu dot org
2009-05-10 16:09 ` pault at gcc dot gnu dot org
2009-05-10 16:10 ` pault at gcc dot gnu dot 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=20090426192200.4959.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).