diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-18 05:50:04 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-18 05:50:04 +0000 |
commit | 6d09540687931eeb0b697fac43e75667eaa042cb (patch) | |
tree | abc062abcfc430d56a8f9f397df682c35b0f4ef9 /gcc/fortran/resolve.c | |
parent | 5e3728f9830849c637b993c520dec8cc85d1b69b (diff) | |
download | gcc-6d09540687931eeb0b697fac43e75667eaa042cb.tar.gz |
2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
PR fortran/15975
* resolve.c (resolve_symbol): Don't assign default
initializer to pointers.
2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
PR fortran/15975
* gfortran.dg/der_pointer_2.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104389 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index f9413336f53..e342a1e8d57 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4328,7 +4328,8 @@ resolve_symbol (gfc_symbol * sym) } /* Assign default initializer. */ - if (sym->ts.type == BT_DERIVED && !(sym->value || whynot)) + if (sym->ts.type == BT_DERIVED && !(sym->value || whynot) + && !sym->attr.pointer) sym->value = gfc_default_initializer (&sym->ts); break; |