public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/45087] -fwhole-program: Miscompiled due to wrong decls
Date: Wed, 28 Jul 2010 13:14:00 -0000 [thread overview]
Message-ID: <20100728131422.27783.qmail@sourceware.org> (raw)
In-Reply-To: <bug-45087-13404@http.gcc.gnu.org/bugzilla/>
------- Comment #4 from burnus at gcc dot gnu dot org 2010-07-28 13:14 -------
(In reply to comment #3)
> Minimal test case, compile with:
> gfortran --param ggc-min-expand=0 --param ggc-min-heapsize=0
The problems seems to be that one tries to free the NEXT twice - once for the
symbol in VALUE and once as global procedure; this can be seen by the value
0xa5a5a5a5a5a5a5a5 in the dump - and by looking at the place where it crashes,
namely: gt_ggc_mx_function; the cleanup is done for the module, i.e.
gt_ggc_m_P17module_htab_entry4htab.
[Actually, it could also be that one frees "VALUE" twice - I have not verified
that it is NEXT.]
I thought something like the following would help - but it does _not_:
--- trans-decl.c (revision 162619)
+++ trans-decl.c (working copy)
@@ -3409,6 +3409,9 @@ gfc_create_module_variable (gfc_symbol *
if (sym->attr.entry)
return;
+ if (sym->attr.if_source != IFSRC_DECL)
+ return;
+
/* Make sure we convert the types of the derived types from iso_c_binding
into (void *). */
if (sym->attr.flavor != FL_PROCEDURE && sym->attr.is_iso_c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087
next prev parent reply other threads:[~2010-07-28 13:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 17:27 [Bug fortran/45087] New: " burnus at gcc dot gnu dot org
2010-07-26 21:04 ` [Bug fortran/45087] " burnus at gcc dot gnu dot org
2010-07-28 9:32 ` burnus at gcc dot gnu dot org
2010-07-28 12:35 ` burnus at gcc dot gnu dot org
2010-07-28 13:14 ` burnus at gcc dot gnu dot org [this message]
2010-07-28 13:52 ` burnus at gcc dot gnu dot org
2010-07-28 20:34 ` burnus at gcc dot gnu dot org
2010-07-29 10:26 ` mikael at gcc dot gnu dot org
2010-07-29 21:08 ` burnus at gcc dot gnu dot org
2010-07-29 21:08 ` burnus 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=20100728131422.27783.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).