------- Comment #8 from paul dot richard dot thomas at cea dot fr 2006-09-04 12:08 ------- Even simpler is:
trans-array.c(gfc_trans_array_constructor_value) replace loopvar = se.expr; by loopvar = gfc_evaluate_now (se.expr, pblock); gfc_expand_constructor is called from resolve_expr and from three places in expr.c. As far as I can tell, non-initialization expressions only try the expansion from resolve_expr. If I flag the calls to distinguish them and limit the maximum number of expanded elements to 10, say, in gfc_expand_constructor, the code reflects this but the compilation time does not. Something, somewhere is doing a temporary expansion of the constructor, which is taking all the time. I have to leave this again but I will get to the bottom of it. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28914