diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 09:32:20 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 09:32:20 +0000 |
commit | c49db15efe1d8b2571d0c2b180338ecce415bff0 (patch) | |
tree | e88e7bef2170afcf8543b177e66227cb3215dc95 /gcc/fortran | |
parent | c8f9aef90a430c044cafc704baa2f50318170616 (diff) | |
download | gcc-c49db15efe1d8b2571d0c2b180338ecce415bff0.tar.gz |
2009-07-26 Tobias Burnus <burnus@net-b.de>
PR fortran/40851
* resolve.c (resolve_symbol): Do not initialize pointer
* derived-types.
* trans-decl.c (init_intent_out_dt): Ditto.
(generate_local_decl): No need to set attr.referenced for DT pointers.
2009-07-26 Tobias Burnus <burnus@net-b.de>
PR fortran/40851
* gfortran.dg/derived_init_3.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150108 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 2 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ca320ca8e71..91a45e91db0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2009-07-27 Tobias Burnus <burnus@net-b.de> + + PR fortran/40851 + * resolve.c (resolve_symbol): Do not initialize pointer derived-types. + * trans-decl.c (init_intent_out_dt): Ditto. + (generate_local_decl): No need to set attr.referenced for DT pointers. + 2009-07-26 Tobias Burnus <burnus@net-b.de> PR fortran/33197 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index aaab554d4de..053ec839a08 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -10036,7 +10036,7 @@ resolve_symbol (gfc_symbol *sym) if ((!a->save && !a->dummy && !a->pointer && !a->in_common && !a->use_assoc && !(a->function && sym != sym->result)) - || (a->dummy && a->intent == INTENT_OUT)) + || (a->dummy && a->intent == INTENT_OUT && !a->pointer)) apply_default_init (sym); } diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index e4ac20f58b2..65a6ac5cca9 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2958,7 +2958,8 @@ init_intent_out_dt (gfc_symbol * proc_sym, tree body) gfc_init_block (&fnblock); for (f = proc_sym->formal; f; f = f->next) if (f->sym && f->sym->attr.intent == INTENT_OUT - && f->sym->ts.type == BT_DERIVED) + && !f->sym->attr.pointer + && f->sym->ts.type == BT_DERIVED) { if (f->sym->ts.derived->attr.alloc_comp) { @@ -3708,6 +3709,7 @@ generate_local_decl (gfc_symbol * sym) if (!sym->attr.referenced && sym->ts.type == BT_DERIVED && sym->ts.derived->attr.alloc_comp + && !sym->attr.pointer && ((sym->attr.dummy && sym->attr.intent == INTENT_OUT) || (sym->attr.result && sym != sym->result))) |