This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/35718] New: deallocating non-allocated pointer target does not fail


The following program fails to raise an error condition in the deallocate
statement.  The pointer target was not created by an allocate.

Dick Hendrickson

      program MF0069
! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]
! F95 page 83, line 34 says deallocating a pointer whose target
!wasn't created by an ALLOCATE causes error condition


      REAL, pointer  :: RLA(:)
      REAL, TARGET   :: RLA1(6)
      RLA1 = 0
      RLA => RLA1
      DEALLOCATE (RLA, STAT = ISTAT)
      IF (ISTAT .LE. 0) print *, 'deallocate did not fail!', istat
      END


-- 
           Summary: deallocating non-allocated pointer target does not fail
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]