http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49540
Adrian Sevcenco <adrian.sevcenco at cern dot ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adrian.sevcenco at cern dot | |ch --- Comment #8 from Adrian Sevcenco <adrian.sevcenco at cern dot ch> 2011-06-28 08:59:38 UTC --- (In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #2) > > > 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. > > > > IIRC, as implemented the array constructor is completely unrolled, for each > > element an entry in the splay tree is generated. > > Yes - at least since dropping the repeat count, which your patch did. > > > One could apply the -fmax-array-constructor=<value> restrictions used e.g. > > for > > PARAMETER arrays and do not unroll arrays of size larger than <value> but > > do it > > on runtime. > > As written, I think it should be sufficient to support the initialization via > a > scalar. In terms of the trans*.c files that already works: > real :: a(3) = 0 > thus, there is no reason why one should be able to set sym->value also for > real a(3) > data a/3*0/ > > That is: If - and only if - one has <repeat count> == size(array), i.e. a > whole-array initialization, one changes the initialization from: > sym->value = [ ( <value>, i = 1, <repeat count>) ] > to > sym->value = <value> > > That should require some reshoveling in the code, but sounds much cleaner as > -fmax-array-constructor= tweaking. Additionally, it will generate much faster > code for "data a/10000000*0.0/" as it gets translated into "static real a = > {}". so with regard to the initial submission from https://bugzilla.redhat.com/show_bug.cgi?id=716721 (and code from http://alisoft.cern.ch/viewvc/trunk/TAmpt/AMPT/hijing1.383_ampt.f?view=markup&root=AliRoot) 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)? Thanks