[comp.sys.next] f2c and LARGE object files

dwatola@nextasy2 (David Watola) (05/02/91)

has anyone noticed this problem with f2c:

typically, f2c seems to produce c source that is twice the size of the original
fortran.  for some reason, i noticed extremely long compile times for these
sources (~40k of source), on the order of several minutes on a 16M cube.  since
my use of infernal fortran is rare, i was not too concerned.  but finally i got
fed up and decided to build a library.  that's when i discovered the reason for
the long compile times.  if i compile source code generated by f2c with 'cc -c'
the resulting object file for my 40k source is a whopping 37 megs!!!  without
the '-c' flag (and with a main() routine to link edit) this 37 meg file is
still generated, but somehow gets trimmed down around 70k after link editing.
this seems ever-so-slightly excessive to me, especially since 37 spare mb on
disk is a fairly rare circumstance around here (had to trim my account back).
the resulting executable works as expected... [UNLIKE ABSOFT FORTRAN, WHICH
DIES HORRIBLY]

so, anyone else experience this?  porting f2c was very painless...  also, these
huge files do not get generated by f2c/gcc or f2c/cc on our hp9000 systems.

-------------------------------------------------------------------------------
dwatola @ nextasy2.eecs.wsu.edu or @ yoda.eecs.wsu.edu
'the world is my toaster oven'

ssr@stokes.Princeton.EDU (Steve S. Roy) (05/02/91)

In article <1991May1.173124.17624@milton.u.washington.edu> dwatola@nextasy2 (David Watola) writes:
>
>has anyone noticed this problem with f2c:
>
>the resulting object file for my 40k source is a whopping 37 megs!!!  without
>the '-c' flag (and with a main() routine to link edit) this 37 meg file is
>still generated, but somehow gets trimmed down around 70k after link editing.


I don't think the problem is with f2c but rather with the assembler,
of all things.

I recently compiled a C program that used large staticly allocated
arrays and got a huge .o file that got trimmed down when linked.  A
little experimentation showed that the .s (assembly language) files
were fine but the size of the .o file was (roughly) proportional to
the size of the static arrays.

This is brain damage.  This should never happen.  It shows that
someone just wasn't thinking, and that no one is checking up on things.

Steve Roy