This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34760] New: PRIVATE variable not allowed as STAT variable in ALLOCATE
- From: "dick dot hendrickson at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2008 20:23:03 -0000
- Subject: [Bug fortran/34760] New: PRIVATE variable not allowed as STAT variable in ALLOCATE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
With gfortran 4.3.0 20080109 I get the error message
ALLOCATE (RLA1(NF10), STAT = ISTAT)
1
Error: STAT expression at (1) must be a variable
With the following program.
MODULE TESTS
INTEGER, PRIVATE :: ISTAT !this one FAILS
! INTEGER :: ISTAT !this one works
! PRIVATE :: ISTAT !this one FAILS
CONTAINS
SUBROUTINE AD0001
REAL RLA1(:)
ALLOCATABLE RLA1
ISTAT = -314
ALLOCATE (RLA1(NF10), STAT = ISTAT)
END SUBROUTINE
END MODULE
In the real module there are several subroutines that do similar
allocates and they do not generate the error. It looks like it is
only the first use of ISTAT in an allocate that triggers the message.
Dick Hendrickson
--
Summary: PRIVATE variable not allowed as STAT variable in
ALLOCATE
Product: gcc
Version: 4.3.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=34760