diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-02-11 20:58:48 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-02-11 20:58:48 +0000 |
commit | dcdc7b6c9d3b3d0170cfeed1d4ebe5d84b73b346 (patch) | |
tree | 97afc311a32371e5a733bcc5f86550b0ef6fcc6f /gcc/fortran/decl.c | |
parent | ba139ba8b7f96b2f1867945d8cec54a99239d31a (diff) | |
download | gcc-dcdc7b6c9d3b3d0170cfeed1d4ebe5d84b73b346.zip gcc-dcdc7b6c9d3b3d0170cfeed1d4ebe5d84b73b346.tar.gz gcc-dcdc7b6c9d3b3d0170cfeed1d4ebe5d84b73b346.tar.bz2 |
re PR fortran/30554 ([4.1 only] ICE in mio_pointer_ref at module.c:1945)
2007-02-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30554
* module.c (find_symtree_for_symbol): New function to return
a symtree that is not a "unique symtree" given a symbol.
(read_module): Do not automatically set pointer_info to
referenced because this inhibits the generation of a unique
symtree. Recycle the existing symtree if possible by calling
find_symtree_for_symbol.
PR fortran/30319
* decl.c (add_init_expr_to_sym): Make new charlen for an array
constructor initializer.
2007-02-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30554
* gfortran.dg/used_dummy_types_6.f90: Add the "privatized"
versions of the modules.
PR fortran/30617
* gfortran.dg/intrinsic_actual_2.f90: Make this legal fortran
by getting rid of recursive I/O and providing functions with
results.
PR fortran/30319
* gfortran.dg/char_array_constructor_2.f90
From-SVN: r121824
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index b25bcc0..f29b035 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -939,8 +939,13 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, gfc_set_constant_character_len (len, init, false); else if (init->expr_type == EXPR_ARRAY) { - gfc_free_expr (init->ts.cl->length); + /* Build a new charlen to prevent simplification from + deleting the length before it is resolved. */ + init->ts.cl = gfc_get_charlen (); + init->ts.cl->next = gfc_current_ns->cl_list; + gfc_current_ns->cl_list = sym->ts.cl; init->ts.cl->length = gfc_copy_expr (sym->ts.cl->length); + for (p = init->value.constructor; p; p = p->next) gfc_set_constant_character_len (len, p->expr, false); } |