This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [google]: initialize language field for clone function struct


On Wed, May 4, 2011 at 1:56 PM, Michael Matz <matz@suse.de> wrote:
> 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)

Well, a save-expr would only be created if evaluation is necessary anyway,
so I don't see the issue really.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]