This is the mail archive of the gcc-bugs@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]

[Bug debug/37890] Incorrect nesting for DW_TAG_imported_declaration



------- Comment #2 from jakub at gcc dot gnu dot org  2009-03-17 09:19 -------
Created an attachment (id=17473)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17473&action=view)
gcc44-pr37890.patch

Ah, it actually is emitted in the correct lexical block, but in addition to
that it is emitted at global scope as well, perhaps multiple times.

Perhaps more complete testcase for gdb purposes:
namespace A
{
  int x = 1;
}

namespace B = A;

void
foo ()
{
  namespace C = A;

  B::x++;
  C::x++;
  {
    namespace D = A;
    D::x++;
  }
}

template <int N>
void
bar ()
{
  namespace C = A;

  B::x++;
  C::x++;
  {
    namespace D = A;
    D::x++;
  }
}

int
main ()
{
  foo ();
  bar<0> ();
  bar<6> ();
}


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


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


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