------- Comment #4 from matz at gcc dot gnu dot org 2010-06-15 13:40 ------- Can you try to instead do the stack-estimation only when really_expand is false? The issue is, we see all variables (or we _should_ see) exactly twice, once for estimation, once for generating the DECL_RTL. The code was so twisted that I didn't want to touch it too much during expand-from-ssa, but I planned to return to that somewhen, hence I'm not sure if we really see each variable only twice. But we should be working towards that goal.
In any case it should be fine to track crtl->stack_alignment_estimated only in the first pass (really_expand == false), and never touch it again in the second pass (really_expand == true). Then you should also be able to simplify the condition. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44542