------- Comment #2 from jakub at gcc dot gnu dot org  2010-07-27 10:39 -------
One of these DW_TAG_variable DIEs at the DW_TAG_namespace scope is created
from declare_in_namespace when processing decls_for_scope of a lexical block.
The other one comes from declare_in_namespace from dwarf2out_global_decl
from wrapup_globals_for_namespace.
The problem is that the C++ FE doesn't unify externs, so the debugger sees
different decls with the same name, but different DECL_UID.
So for say
namespace N
{
  int i;
  void foo (void)
  {
    { extern int i; i++; }
    { extern int i; i++; }
    { extern int i; i++; }
    { extern int i; i++; }
  }
}
there will be 5 DW_TAG_variable DIEs in DW_TAG_namespace.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu dot
                   |                            |org, jason at gcc dot gnu
                   |                            |dot org


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

Reply via email to