[Bug fortran/49540] [4.6/4.7 Regression] Memory-hog with large DATA stmt
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 28 12:20:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49540
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-28 12:20:41 UTC ---
(In reply to comment #8)
> do you have some specific (and certain) recommendations in order to make this
> scientific code to be compiled (alongside with a lot other fortran scientific
> code)?
As short term solution: Use an older version of gfortran (before
4.6.0-2010-05-05) - or remove the 0 initialization. While the Fortran standard
does not guarantee it, in practice, static memory should nevertheless be zero
initialized (.bss).
The proper fix will take a bit longer: A couple of days for the fix and then it
will likely also take a while until a Red Hat/Fedora build will be available.
(Though, non-Fedora nightly builds will have it earlier.)
* * *
(In reply to comment #7)
> As written, I think it should be sufficient to support the initialization
> via a scalar.
For what it is worth: Intel's compiler seem to do the same. Hence,
DATA B/<repeat>*<value>/
is is very fast while using
DATA B(:)/<repeat>*<value>/
is very slow - even though, both lines are effectively the same.
More information about the Gcc-bugs
mailing list