This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41197] New: ICE with ALLOCATE and nonscalar STAT= variable
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2009 14:22:15 -0000
- Subject: [Bug fortran/41197] New: ICE with ALLOCATE and nonscalar STAT= variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Reported by Jorge at http://gcc.gnu.org/ml/fortran/2009-08/msg00474.html
integer, dimension (4) :: ier = 0
integer, dimension (:), allocatable :: a
allocate (a (16), stat = ier)
end
Gives a segfault with GCC 4.1 to 4.5. With the current trunk, valgrind shows:
==26026== Invalid read of size 4
==26026== at 0x533591: gfc_conv_scalarized_array_ref (trans-array.c:2477)
==26026== by 0x533CA4: gfc_conv_array_ref (trans-array.c:2527)
==26026== Address 0x188 is not stack'd, malloc'd or (recently) free'd
test.f90: In function 'MAIN__':
test.f90:1:0: internal compiler error: Segmentation fault
--
Summary: ICE with ALLOCATE and nonscalar STAT= variable
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41197