This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 symtab/11826] New: namespaced C++ extern block-local variable not resolved


volatile int l;
namespace S
{
  int i = 24;
  void __attribute__((noinline))
  f()
  {
    int i = 42;
    l = i;// { dg-final { gdb-test 13 "i" "42" } }
    {
      extern int i;
      l = i;// { dg-final { gdb-test 16 "i" "24" } } // line 12
    }
  }
}
int
main (void)
{
  S::f ();
  return 0;
}

(gdb) b 12
Breakpoint 1 at 0x400568: file ns.C, line 12.
(gdb) r
(gdb) p i
Address of symbol "i" is unknown.

FAIL: GNU gdb (GDB) 7.2.50.20100721-cvs
FAIL: gdb-7.1-29.fc13.x86_64

-- 
           Summary: namespaced C++ extern block-local variable not resolved
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org,jakub at redhat dot com
GCC target triplet: x86_64-fedora13-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11826

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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