From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7291 invoked by alias); 27 Mar 2008 16:01:07 -0000 Received: (qmail 6863 invoked by uid 48); 27 Mar 2008 16:00:24 -0000 Date: Thu, 27 Mar 2008 16:01:00 -0000 Subject: [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dick dot hendrickson at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg02155.txt.bz2 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