diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-21 14:50:57 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-21 14:50:57 +0000 |
commit | 802532b9e1829c6b2db8a490415ee351df7023f2 (patch) | |
tree | 73b55a92cbe026c1c26f39ee2a1feac959a278bd /gcc/fortran/module.c | |
parent | e4f7462199ad71bf537525a43a4e87518f4129fe (diff) | |
download | gcc-802532b9e1829c6b2db8a490415ee351df7023f2.tar.gz |
2010-08-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/45271
PR fortran/45290
* class.c (add_proc_comp): Add static initializer for PPCs.
(add_procs_to_declared_vtab): Modified comment.
* module.c (mio_component): Add argument 'vtype'. Don't read/write the
initializer if the component is part of a vtype.
(mio_component_list): Add argument 'vtype', pass it on to
'mio_component'.
(mio_symbol): Modified call to 'mio_component_list'.
* trans.h (gfc_conv_initializer): Modified prototype.
(gfc_trans_assign_vtab_procs): Removed.
* trans-common.c (create_common): Modified call to
'gfc_conv_initializer'.
* trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
gfc_emit_parameter_debug_info): Modified call to
'gfc_conv_initializer'.
(build_function_decl): Remove assertion.
* trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
Removed call to 'gfc_trans_assign_vtab_procs'.
(gfc_conv_initializer): Add argument 'procptr'.
(gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
(gfc_trans_assign_vtab_procs): Removed.
* trans-stmt.c (gfc_trans_allocate): Removed call to
'gfc_trans_assign_vtab_procs'.
2010-08-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/44863
PR fortran/45271
PR fortran/45290
* gfortran.dg/dynamic_dispatch_10.f03: New (PR 44863 comment #1).
* gfortran.dg/pointer_init_5.f90: New (PR 45290 comment #6).
* gfortran.dg/typebound_call_18.f03: New (PR 45271 comment #3).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163445 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index d68e868dba2..e9a8625212d 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -2343,7 +2343,7 @@ static void mio_formal_arglist (gfc_formal_arglist **formal); static void mio_typebound_proc (gfc_typebound_proc** proc); static void -mio_component (gfc_component *c) +mio_component (gfc_component *c, int vtype) { pointer_info *p; int n; @@ -2373,7 +2373,8 @@ mio_component (gfc_component *c) mio_symbol_attribute (&c->attr); c->attr.access = MIO_NAME (gfc_access) (c->attr.access, access_types); - mio_expr (&c->initializer); + if (!vtype) + mio_expr (&c->initializer); if (c->attr.proc_pointer) { @@ -2408,7 +2409,7 @@ mio_component (gfc_component *c) static void -mio_component_list (gfc_component **cp) +mio_component_list (gfc_component **cp, int vtype) { gfc_component *c, *tail; @@ -2417,7 +2418,7 @@ mio_component_list (gfc_component **cp) if (iomode == IO_OUTPUT) { for (c = *cp; c; c = c->next) - mio_component (c); + mio_component (c, vtype); } else { @@ -2430,7 +2431,7 @@ mio_component_list (gfc_component **cp) break; c = gfc_get_component (); - mio_component (c); + mio_component (c, vtype); if (tail == NULL) *cp = c; @@ -3597,7 +3598,7 @@ mio_symbol (gfc_symbol *sym) /* Note that components are always saved, even if they are supposed to be private. Component access is checked during searching. */ - mio_component_list (&sym->components); + mio_component_list (&sym->components, sym->attr.vtype); if (sym->components != NULL) sym->component_access |