This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34159] New: Checkbound could warn about unallocated arrays
- From: "P dot Schaffnit at access dot rwth-aachen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2007 08:49:36 -0000
- Subject: [Bug fortran/34159] New: Checkbound could warn about unallocated arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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