Re: Does deallocate also nullify a pointer ?
- From: reubendb <reubendb@xxxxxxxxx>
- Date: Tue, 9 Dec 2008 09:55:16 -0800 (PST)
On Dec 9, 11:56 am, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
reubendb <reube...@xxxxxxxxx> wrote:<snip>
On Dec 2, 8:12 pm, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
reubendb <reube...@xxxxxxxxx> wrote:
Is it part of the standard that passing an allocated pointer to
"deallocate()" alsonullifythe pointer ?
For example, here is my test program and the module:[code elided]
It seems that this is only a problem when an allocatable array
(NodeList) is a member of the derived type (BasicMeshStructureType),
otherwise it behaves as I expected.
So I am just want to make sure it's not a problem with my program
before I claim that this is a compiler bug.
Looks like a compiler bug to me. (I might note that at least the copy of
g95 I have installed here gets it right).
Thanks. I tested this with gfortran-4.3 and g95 and they seem to get
the right answer too. The compiler I was talking about is PGI, so I
guess I'll try file bug report with them.