[Bug fortran/40472] Simplification of spread intrinsic takes a long time

dfranke at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Jun 20 12:01:00 GMT 2009



------- Comment #6 from dfranke at gcc dot gnu dot org  2009-06-20 12:01 -------
(In reply to comment #4)
> > Essentially yes, but the compile-time simplifier for spread (and others)
> > was introduced only recently.
>
> As I say above, this is not an initialization expression and so, in that
> respect, it is not the same as pr34554.

If used as initialization expression (as allowed by F2003), the problem is
technically the same. So, there's no easy way out :(

$> cat pr40472.f90
REAL, DIMENSION(720,360), PARAMETER :: ZLON_MASK = SPREAD( (/ (JLON ,
JLON=1,720) /) , DIM=2, NCOPIES=360 )
print *, size(ZLON_MASK)
END

$> time gfortran-svn pr40472.f90

real    11m31.051s
user    11m30.907s
sys     0m0.176s


Paul, what's your point of view on replacing the linear list by the splay-tree
('con_by_offset' in gfc_expr)?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40472



More information about the Gcc-bugs mailing list