This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35718] New: deallocating non-allocated pointer target does not fail
- From: "dick dot hendrickson at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2008 16:00:24 -0000
- Subject: [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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