This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/37890] Incorrect nesting for DW_TAG_imported_declaration
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2009 09:19:18 -0000
- Subject: [Bug debug/37890] Incorrect nesting for DW_TAG_imported_declaration
- References: <bug-37890-11288@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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