tree-inline mishandles ADDR_EXPRs
Alexandre Oliva
aoliva@redhat.com
Mon Dec 13 17:01:00 GMT 2004
On Dec 11, 2004, Richard Henderson <rth@gcc.gnu.org> wrote:
> On Sat, Dec 11, 2004 at 12:26:52AM -0200, Alexandre Oliva wrote:
>> Maybe all we need is to avoid the optimization for self-inlining.
> I think so.
>> + if (var && (TREE_CODE (var) == VAR_DECL
>> + || TREE_CODE (var) == PARM_DECL
>> + || TREE_CODE (var) == LABEL_DECL)
>> + && ! lang_hooks.tree_inlining.auto_var_in_fn_p (var, fn))
> Why the extra var_decl etc check? I'd think auto_var_in_fn_p would
> take care of that.
I got the impression it might not, from other call sites. Looking at
the implementation in the C and C++ front-ends, I see that it does.
I'll further simplify the patch I just posted and report back.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
More information about the Gcc-patches
mailing list