This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: tree-inline mishandles ADDR_EXPRs
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Richard Henderson <rth at gcc dot gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, dnovillo at redhat dot com, jakub at redhat dot com
- Date: 13 Dec 2004 15:00:51 -0200
- Subject: Re: tree-inline mishandles ADDR_EXPRs
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <orfz2dlgcz.fsf@livre.redhat.lsd.ic.unicamp.br><20041211231637.GB31625@redhat.com>
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}