This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Another bug in local static variables
> Rather than pile up hacks like this, we should fix the representation
> problem. I would think that a simple fix would be to use the local decl
> for statics. In copy_body_r, rather than use remap_decl for autos, we
> should just do a splay tree lookup and use the result if it's there.
As I understand it, we must duplicate the decls in BIND_EXPR to get
debugging right and also becuase single decl can not apepar in mulitple
On the other hand if we duplicate decls inside the function body, we
will end up with single variable referred by multiple decls everywhere
(imagine two inline versions of function in one body) that will
completely confuse tree-ssa. Having to look for abstract orgin each
time looks pretty expensive.
Do you have some better idea how to fix this?