------- Comment #3 from dfranke at gcc dot gnu dot org 2009-06-20 09:51 ------- > Probably a duplicate of pr34554
Essentially yes, but the compile-time simplifier for spread (and others) was introduced only recently. A while ago, I started an attempt to replace the linear constructor list with the already existing splay-tree implementation (which was added for DATA-statements). Due to real-life limitation, I didn't finish it (yet), but I believe that's the way to go on the long run. Philippe, to avoid the simplifier, you could replace one of the constant expressions by a variable, e.g. -- 8< -- REAL, DIMENSION(720,360) :: ZLON_MASK INTEGER :: d d = 2 ZLON_MASK(:,:)= SPREAD( (/ (JLON , JLON=1,720) /) , DIM=d, NCOPIES=360 ) END -- 8< -- This skips the currently inefficient process at compile-time and calls the library implementation at run-time, as it did before. -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|x86_64-unknown-linux-gnu | GCC host triplet|x86_64-unknown-linux-gnu | GCC target triplet|x86_64-unknown-linux-gnu | Keywords| |compile-time-hog Known to fail| |4.5.0 Known to work| |4.4.1 Last reconfirmed|0000-00-00 00:00:00 |2009-06-20 09:51:23 date| | Summary|Problem with spread |Simplification of spread |intrinsic |intrinsic takes a long time http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40472