This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56638] New: Linker uses a lot of memory in Fortran 77
- From: "ncc1701zzz at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 16 Mar 2013 19:45:49 +0000
- Subject: [Bug fortran/56638] New: Linker uses a lot of memory in Fortran 77
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56638
Bug #: 56638
Summary: Linker uses a lot of memory in Fortran 77
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ncc1701zzz@gmail.com
Hi.
I hope this is not a repeated bug. I haven't found a similar bug.
I'm using gfortran 4.6.3 in a Raspberry Pi (ARM architecture).
When compiling a Fortran 77 file, I've noticed that in the linking process, it
uses as much RAM as declared in all the variables. The executable generated is
small and the execution doesn't uses so much RAM if the full array is not
addressed.
I have a software that reserves a lot of RAM (because Fortran 77 doesn't
support dynamically assigned memory) but it won't address the entire range. I
cannot compile it in the Raspberry Pi, but it compiles fine in a x86 linux and
in Cygwin.
Example program:
PROGRAM BUG
IMPLICIT NONE
INTEGER LARGE(100000000)
LARGE(1)=1
END
Compile the object, this works fine:
gfortran -c program.f
Generate the executable. This uses over 400 MB of RAM (100.000.000 elements of
4 bytes):
gfortran -o program program.f
If you increase the length of the array LARGE in the code, it will use more and
more RAM.
Full output of the compiler version:
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6
--with-fpu=vfp --with-float=hard --enable-checking=release
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
Is this considered a bug?
Thanks!
Best regards.