[tree-ssa] Fix variables getting out of their scope
Daniel Berlin
dberlin@dberlin.org
Wed Aug 20 22:21:00 GMT 2003
>>
>> Except, when you move a statement, doesn't it's scope change?
>> We don't reset it to the right scope automatically, do we?
>> So stmt_ann (stmt)->scope will be the wrong scope still (and
>> scope_level will be off)
>
> ah, sure.
>
>> I have to do something like this hack (which only works if there are
>> other statements in the block you are moving to), methinks:
>
> well, almost. Given that boundary of BIND_EXPR may be in the middle of
> a basic block, this does not always have to be exactly what you want.
> Not that I would be aware of an easy solution.
Richard Henderson suggested we simply change the way we process the
VAR_DECL's so that we walk the bind_vars before walking anything. That
way, we don't have to move things around.
More information about the Gcc-patches
mailing list