]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/34438 (gfortran not compliant w.r.t default initialization of derived...
authorPaul Thomas <pault@gcc.gnu.org>
Fri, 21 Dec 2007 21:20:38 +0000 (21:20 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Fri, 21 Dec 2007 21:20:38 +0000 (21:20 +0000)
commitb7b184a86b471a0cdcdd69062cc2e5827bede7b2
tree122845e14ab1b5b0cedf84997593e4f37ed7cd37
parentd7d20e1c12ee9a2df81a86552737a66d5d858c85
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
gcc/fortran/ChangeLog
gcc/fortran/module.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/default_initialization_3.f90 [new file with mode: 0644]