--- Comment #5 from sgk at troutmask dot apl dot washington dot edu
2010-06-11 20:16 ---
Subject: Re: DEALLOCATE aborts program even with STAT=
On Fri, Jun 11, 2010 at 06:22:57PM -, remko dot scharroo at me dot com
wrote:
>
>
> --- Comment #3 from remko dot scharroo at me do
--- Comment #4 from burnus at gcc dot gnu dot org 2010-06-11 19:54 ---
(In reply to comment #3)
> I fully agree that the second "deallocate (p2, stat=ios)" is a violation.
> That is the actual intend of this program.
Well, I can also complain that
fhjdshlkgjflsg
end
does not calculate
--- Comment #3 from remko dot scharroo at me dot com 2010-06-11 18:22
---
I fully agree that the second "deallocate (p2, stat=ios)" is a violation.
That is the actual intend of this program.
You know, this is not arbitrary code. You can often have multiple pointers
pointing to allocated
--- Comment #2 from kargl at gcc dot gnu dot org 2010-06-11 18:12 ---
Reset several to 'normal'. Fortran bugs are never 'major'.
I believe your code is invalid, and so gfortran can do
anything it wants. F2003 has
19 6.3.3.2 Deallocation of pointer targets
If a pointer appear
--- Comment #1 from burnus at gcc dot gnu dot org 2010-06-11 18:04 ---
I think this is a bug in your program:
allocate (a) ! Allocate memory
p1 => a
p2 => a
! All of {a, p1, p2} point to the same memory.
deallocate (p1, stat=ios)
! Free memory pointed to by {a, p1, p2}
! and mark "p1