Dear fellows,
The program I submitted to the list (Tue, 10 Oct 2000 15:20:34 +0200) is
not standard conformant. I was a fool thinking that the return argument
STAT from DEALLOCATE would catch the case when the deallocate object was a
pointer to an allocatable array.
Now, 5 out of 6 commercial compilers I have tried does flag this in the
STAT variable. The sixth one does not flag it and instead deallocates the
target array which is clever too. No compiler I tried blew up my hard disk
or killed my cat, but they were free to do it from a standard conformant
point of view.
The standard is what it is (and I haven't bought a copy of it yet). Anyone
knows if it was ever up to discussion if it was to be an "error condition"
instead of a user error to use a pointer to an allocated target array as an
argument to DEALLOCATE? And if there is anything in these lines in the F2k
discussions?
I enclose a modified version of the earlier code for you to look at and
test. And imagine that I sent out a non-conforming code to the list and
didn't get flamed ;-)
/Nils
|