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: Avoid duplicate decls in inlined and versioned functions


On Sat, Feb 28, 2009 at 11:10 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> Currently inliner merge callee's local_decls into callers duplicating all
> global vars. ?This can be easilly abused to construct memory bomb using early
> inliner.
>
> Patch adds referenced_var_check_and_insert check into local_decls copying
> code. Now we need to reorder copying before body duplication because we
> add into referenced vars all the variables while copying the VAR_DECLs.
>
> Similar problem exists in function versioning code where declaration of removed
> parameter is added twice: once by copy_arguments_for_versioning, second time by
> setup_one_parameter. ?We need to reorder copying and argument setup and watch
> for existing decls during copying, otherwise we would miss completely
> elliminated declarations. ?Those remain in debug info and confuse GDB
> that is not expecting two declarations with same name in same scope
> block.
>
> Bootstrapped/regtested i686-linux, OK?
>
> ? ? ? ?* tree-inline.c (expand_call_inline): Avoid

I think it caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360


H.J.


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