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: tree-inline mishandles ADDR_EXPRs


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}


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