Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 53328 - g77 -D_LARGEFILE_SOURCE > >-D_FILE_OFFSET_BITS=64 won't enable large files >2gb
g77 -D_LARGEFILE_SOURCE > >-D_FILE_OFFSET_BITS=64 won't enable large files >2gb
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2001-09-06 15:21 EDT by Jay W Parker
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-07 09:38:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jay W Parker 2001-09-06 15:21:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.7 (Macintosh; I; PPC)

Description of problem:
I want fortran code to write files >2gb.  I get code that stops at 2gb with message "Filesize limit exceeded"

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.I'm testing with the following code (big.f):
        implicit none

c size of array (x8 for bytes, so 50M -> 400Mb)
      integer fsiz
      parameter (fsiz = 5000000)

        integer i
        real*8 bigarr(fsiz)
        common /big/ bigarr

        do 10 i=1,fsiz
 10     continue
        do 20  i=1,100
         write(*,*) "iter ",i
         write(15) bigarr
 20     continue        

compiled with 
g77 -c -O3 -fno-underscoring -malign-double -Wuninitialized -funroll-all-loops -finline-functions -


Actual Results:  When the a.out is run, a file is created at exactly 2gb:
> >-rw-rw-r--    1 jwp      gipsy    2147483647 Aug  9 10:13 bigflile
> and then stops with the message
> >Filesize limit exceeded

Expected Results:  Want bigger file with no errors.

Additional info:

"limit" says I have plenty of room:
wilbur.jpl.nasa.gov{jwp}74: limit
cputime         0:0-1
filesize        4194303 kbytes
datasize        4194303 kbytes
stacksize       8192 kbytes
coredumpsize    0 kbytes
memoryuse       4194303 kbytes
descriptors     1024 
memorylocked    4194303 kbytes
maxproc         32766 
openfiles       1024
Comment 1 Jakub Jelinek 2001-09-07 09:38:40 EDT
libf3c in gcc up to 3.0.x (inclusive) don't support LFS.
LFS changes are currently in CVS trunk libf2c (3.1), I'll backport them
to gcc 3.0.x eventually.
Comment 2 Jakub Jelinek 2002-01-17 10:51:54 EST
Should work in gcc-3.1-XX from rawhide.

Note You need to log in before you can comment on or make changes to this bug.