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: [PATCH] Fix ICE with -feliminate-dwarf2-dups or -gdwarf-4 (PR debug/46123)


On 11/24/2010 05:49 PM, Jason Merrill wrote:
I think it's correct to re-use the DIE in the local class for the
abstract instance of the member function; it's just any concrete
instance that we want to go somewhere else.

So, I'm not sure why you would need to change the if (old_die) branch at all; concrete instances should fall under the first branch, if (origin != NULL).


It seems that perhaps the problem is that we are failing to split the abstract and concrete instances here: gen_decl_die has

        /* If we're emitting an out-of-line copy of an inline function,
           emit info for the abstract instance and set up to refer to it.  */
        else if (cgraph_function_possibly_inlined_p (decl)
                 && ! DECL_ABSTRACT (decl)
                 && ! class_or_namespace_scope_p (context_die)
                 /* dwarf2out_abstract_function won't emit a die if this is just
                    a declaration.  We must avoid setting DECL_ABSTRACT_ORIGIN in
                    that case, because that works only if we have a die.  */
                 && DECL_INITIAL (decl) != NULL_TREE)
          {
            dwarf2out_abstract_function (decl);
            set_decl_origin_self (decl);
          }

but cgraph_function_possibly_inlined_p is false in this case. I guess that isn't the right test.


Jason


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