Hi, On Wed, 4 May 2011, Richard Guenther wrote:
> > It prevents save_expr from being called at global level, since you > > cannot create SAVE_EXPRs outside functions. Likewise in > > variable_size. > > I see several places in fold-const.c that are not properly guarded then. > But anyway, if it is supposed to protect SAVE_EXPRs then I'd have > expected save_expr to contain that check and possibly return NULL if it > can't save. > > And I'm not sure you can't do SAVE_EXPRs outside of functions - you > could simply emit global temporaries. It's not the temporary, but the evaluation that poses problems in global context. (you could add a global ctor to it, ugh) Ciao, Michael.