This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/30014] New: INQUIRE (iolength = xx) limited to kind=4
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2006 03:48:54 -0000
- Subject: [Bug libfortran/30014] New: INQUIRE (iolength = xx) limited to kind=4
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When attempting to determine iolength of an output list greater than 2^31
bytes, INQUIRE returns a negative value even if xx is kind=8.
program subrecord
integer, parameter :: arraydim = huge(1_4)/16
real, dimension(arraydim) :: array
integer :: x
integer(kind=8) :: recl
open(unit=10, file="testfile", form="unformatted", access="sequential")
print *, "arraydim =",arraydim
inquire (iolength = recl) array,x,array,x,array,x,array,x,x,x
print *, "record size =", recl
end program subrecord
$ gfc subrecord.f90
$ ./a.out
arraydim = 134217727
record size = -2147483640
--
Summary: INQUIRE (iolength = xx) limited to kind=4
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jvdelisle at gcc dot gnu dot org
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30014