diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-05-02 14:13:17 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-05-02 14:13:17 +0000 |
commit | 613e2ac8d3dc830f03c00b165ffcf85b96717240 (patch) | |
tree | 5e8905912be5f73f8c12dcef22be42404b8d7168 /gcc/fortran/trans-common.c | |
parent | 597fb86c9078a5d7e1e84b222eb18012263cfb8c (diff) | |
download | gcc-613e2ac8d3dc830f03c00b165ffcf85b96717240.tar.gz |
re PR fortran/27269 (Segfault with EQUIVALENCEs in modules together with ONLY clauses)
2006-05-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27269
* module.c: Add static flag in_load_equiv.
(mio_expr_ref): Return if no symtree and in_load_equiv.
(load_equiv): If any of the equivalence members have no symtree, free
the equivalence and the associated expressions.
PR fortran/27324
* trans-common.c (gfc_trans_common): Invert the order of calls to
finish equivalences and gfc_commit_symbols.
PR fortran/27269
PR fortran/27324
* gfortran.dg/module_equivalence_2.f90: New test.
From-SVN: r113465
Diffstat (limited to 'gcc/fortran/trans-common.c')
-rw-r--r-- | gcc/fortran/trans-common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 3b16e5e0065..bf19d12c91f 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -1057,9 +1057,10 @@ gfc_trans_common (gfc_namespace *ns) /* Translate all named common blocks. */ gfc_traverse_symtree (ns->common_root, named_common); - /* Commit the newly created symbols for common blocks. */ - gfc_commit_symbols (); - /* Translate local equivalence. */ finish_equivalences (ns); + + /* Commit the newly created symbols for common blocks and module + equivalences. */ + gfc_commit_symbols (); } |