diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-12-21 21:20:38 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-12-21 21:20:38 +0000 |
commit | b7b184a86b471a0cdcdd69062cc2e5827bede7b2 (patch) | |
tree | 122845e14ab1b5b0cedf84997593e4f37ed7cd37 /gcc/fortran/module.c | |
parent | d7d20e1c12ee9a2df81a86552737a66d5d858c85 (diff) | |
download | gcc-b7b184a86b471a0cdcdd69062cc2e5827bede7b2.zip gcc-b7b184a86b471a0cdcdd69062cc2e5827bede7b2.tar.gz gcc-b7b184a86b471a0cdcdd69062cc2e5827bede7b2.tar.bz2 |
re PR fortran/34438 (gfortran not compliant w.r.t default initialization of derived type component and implicit SAVE attribute)
2007-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34438
* trans-decl.c (gfc_finish_var_decl): Do not mark derived types
with default initializers as TREE_STATIC unless they are in the
main program scope.
(gfc_get_symbol_decl): Pass derived types with a default
initializer to gfc_defer_symbol_init.
(init_default_dt): Apply default initializer to a derived type.
(init_intent_out_dt): Call init_default_dt.
(gfc_trans_deferred_vars): Ditto.
* module.c (read_module): Check sym->module is there before
using it in a string comparison.
2007-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34438
* gfortran.dg/default_initialization_3.f90: New test.
From-SVN: r131124
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 9cb082a..f3c54b7 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3732,6 +3732,7 @@ read_module (void) if (st && only_flag && !st->n.sym->attr.use_only && !st->n.sym->attr.use_rename + && st->n.sym->module && strcmp (st->n.sym->module, module_name) == 0) st->name = gfc_get_string ("hidden.%s", name); |