diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-08-27 14:07:43 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-08-27 14:07:43 +0200 |
commit | 6f79f4d1d6c6e3dcb0231404969882726d31a50c (patch) | |
tree | 35954802481b336b7827eb81f61dda5ed4be17f6 /gcc/fortran/match.c | |
parent | 1d6368551e85cac41df6df4234d865918b693319 (diff) | |
download | gcc-6f79f4d1d6c6e3dcb0231404969882726d31a50c.zip gcc-6f79f4d1d6c6e3dcb0231404969882726d31a50c.tar.gz gcc-6f79f4d1d6c6e3dcb0231404969882726d31a50c.tar.bz2 |
re PR fortran/41093 (memory leaks with gfc_namespace)
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/41093
* gfortran.h (gfc_common_head): Add "int refs".
* match.c (gfc_match_common): Increment refs.
* resolve.c (resolve_symbol): Only increment formal_ns->refs
if formal_ns is not sym->ns.
* symbol.c (gfc_free_symbol): Only free formal_ns if
if formal_ns is not sym->ns. Free common_block if refs is one.
(gfc_release_symbol): Release formal_ns only if the
symbol is not ENTRY of a module.
* decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
* parse.c (parse_interface): Incement proc_unit->refs++ for
proc-pointer result variables.
* module.c (mio_symbol): Don't increase sym->refs for its
use in sym->formal_ns->proc_name.
From-SVN: r190710
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 0b1cf5a..4c713a5 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -4398,6 +4398,7 @@ gfc_match_common (void) /* Store a ref to the common block for error checking. */ sym->common_block = t; + sym->common_block->refs++; /* See if we know the current common block is bind(c), and if so, then see if we can check if the symbol is (which it'll |