From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5340 invoked by alias); 20 Nov 2007 08:49:45 -0000 Received: (qmail 5327 invoked by uid 48); 20 Nov 2007 08:49:36 -0000 Date: Tue, 20 Nov 2007 08:49:00 -0000 Subject: [Bug fortran/34159] New: Checkbound could warn about unallocated arrays X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "P dot Schaffnit at access dot rwth-aachen dot de" 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: 2007-11/txt/msg01886.txt.bz2 Hi! I don't seem to get gfortran to warn when assigning to an unallocated array (I've tried '-g -fbounds-check -Wall -pedantic', which I take it should cover it all), it only segfaults at run-time... While this is obviously menial stuff, the Lahey compiler for one nicely warns both at compile- and run-time. Just for the record... Thanks! Philippe PS: a reduced example: ! PROGRAM Test ! INTEGER, ALLOCATABLE :: Array(:) ! Array = 256 ! END PROGRAM Test ! PPS: I've tried with GNU Fortran (GCC) 4.3.0 20071119 (experimental) [trunk revision 130286] -- Summary: Checkbound could warn about unallocated arrays Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: P dot Schaffnit at access dot rwth-aachen dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34159