This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33120] Large module object files when declare arrays on Mac OSX
- From: "dave dot allured at noaa dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Oct 2008 00:32:32 -0000
- Subject: [Bug target/33120] Large module object files when declare arrays on Mac OSX
- References: <bug-33120-14995@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from dave dot allured at noaa dot gov 2008-10-02 00:32 -------
Confirmed this problem for gcc 4.3.1 on Mac OS 10.5.5.
A workaround, and recommended best practice for new code, is to make arrays in
modules allocatable, i.e. don't declare statically dimensioned large arrays.
Then you must add allocate statements at the appropriate initialization
locations.
This is a problem for legacy fortran 90+ code because adding code for dynamic
allocation can spawn bugs. The preferred solution is that uninitialized
variables should never occupy physical space in object files. My thanks to
whomever can work on this fix.
--Dave A.
--
dave dot allured at noaa dot gov changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dave dot allured at noaa dot
| |gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33120