Bug 53328 - g77 -D_LARGEFILE_SOURCE > >-D_FILE_OFFSET_BITS=64 won't enable large files >2gb
Summary: g77 -D_LARGEFILE_SOURCE > >-D_FILE_OFFSET_BITS=64 won't enable large files >2gb
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-06 19:21 UTC by Jay W Parker
Modified: 2007-04-18 16:36 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-09-07 13:38:47 UTC


Attachments (Terms of Use)

Description Jay W Parker 2001-09-06 19:21:27 UTC
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:
Always

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

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
          bigarr(i)=dble(i)/2.d0
 10     continue
        open(15,file='bigflile',status='unknown',form='unformatted')
        do 20  i=1,100
         write(*,*) "iter ",i
         write(15) bigarr
 20     continue        
        close(15)
        end

compiled with 
g77 -c -O3 -fno-underscoring -malign-double -Wuninitialized -funroll-all-loops -finline-functions -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 big.f

2.
3.
	

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 13:38:40 UTC
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 15:51:54 UTC
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.