------- 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 appears in a DEALLOCATE statement, its association
  status shall be defined.  Deallocating a pointer that is
  disassociated or whose target was not created by an ALLOCATE
  statement causes an error condition in the DEALLOCATE statement.
  If a pointer is associated with an allocatable entity, the pointer
  shall not be deallocated.

  If a pointer appears in a DEALLOCATE statement, it shall be
  associated with the whole of an object that was created by
  allocation.  Deallocating a pointer target causes the pointer
  association status of any other pointer that is associated with
  the target or a portion of the target to become undefined.

Your statement "deallocate (p1, stat=ios)" causes p2 to become
undefined.  Thus, your statement "deallocate (p2, stat=ios)"
violates the first sentence in this section.

Of course, I could be wrong.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sgk at troutmask dot apl dot
                   |                            |washington dot edu
           Severity|major                       |normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44504

Reply via email to