[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
Mon Jun 27 15:53:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49540
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org,
| |dfranke at gcc dot gnu.org,
| |jvdelisle at gcc dot
| |gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-27 12:31:53 UTC ---
The patch in question (Rev. 159076, cf. link in comment 0) is:
2010-05-05 Daniel Franke <franke.daniel@gmail.com>
PR fortran/24978
* gfortran.h: Removed repeat count from constructor, removed
all usages.
That PR fixed an ICE on invalid code - and ensured gfortran diagnoses code
like:
real :: e(3)
data e / 3*1 /
data e(2) / 2 /
where "e"'s second element is multiple times initialized (which is not
diagnosed with -std=gnu, only with -std=f2008 - with gnu/legacy and with ifort,
the second initialization is plainly ignored).
Thus, in some way, the repeat count must come back. One possibility is to
handle the special case /<array_size>*<value>/, which is equivalent to a scalar
initialization. I think that should cover the most common case.
More information about the Gcc-bugs
mailing list