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-ssa] Fix variables getting out of their scope


On Wed, 13 Aug 2003 19:19:09 +0200, Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> wrote:

> Hello,
>
>> >> +   /* ??? Not sure why, but it makes dwarf2out happy.  */
>> >> +   DECL_ABSTRACT_ORIGIN (var) = NULL_TREE;
>> >>
>> > Could you find out?  What happens if DECL_ABSTRACT_ORIGIN(var) was not
>> > NULL to begin with?
>> 
>> DECL_ABSTRACT_ORIGIN failures are usually caused by failing to emit debug
>> info for the original variable, so when we go to refer to it from an
>> inlined copy we can't find it.
>
> yes, it seems like the problem, although I still am not really sure why
> it occurs.  The variable is declared in the outer scope, so why is
> there a problem with finding it?

Probably the problem is that we haven't generated debug info for the
abstract instance yet, so trying to refer to it fails.  I don't know why
that would be, since add_abstract_origin_attribute calls
dwarf2out_abstract_function.

Or perhaps optimization of the inline function is discarding the original
variable, so there's nothing for the inlined copy to refer to.  I've been
thinking that for inlining we want to use an unoptimized version of the
function, so we need to make a copy of the inlined function before we start
optimizing.

Jason


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