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/34159] New: Checkbound could warn about unallocated arrays


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


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