diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-06-02 15:31:30 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-06-02 15:31:30 +0000 |
commit | 7d3fe98e4f161e15cbb329cc44da260abadfb2fd (patch) | |
tree | b62f6b978a84b89b3336f7a7073d9ae1e448afa2 /gdb/testsuite/gdb.cp | |
parent | d0ef7741c534042736e2f2734daceb4738715f80 (diff) | |
download | gdb-7d3fe98e4f161e15cbb329cc44da260abadfb2fd.zip gdb-7d3fe98e4f161e15cbb329cc44da260abadfb2fd.tar.gz gdb-7d3fe98e4f161e15cbb329cc44da260abadfb2fd.tar.bz2 |
Fix ADL anonymous name crash.
2010-06-02 Sami Wagiaalla <swagiaal@redhat.com>
* cp-support.c (make_symbol_overload_list_adl_namespace): Handle
anonymous type case.
2010-06-02 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/koenig.exp: Added new test case.
* gdb.cp/koenig.cc: Ditto.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/koenig.cc | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/koenig.exp | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/koenig.cc b/gdb/testsuite/gdb.cp/koenig.cc index 6cfa3f5..fb4ecb1 100644 --- a/gdb/testsuite/gdb.cp/koenig.cc +++ b/gdb/testsuite/gdb.cp/koenig.cc @@ -175,6 +175,13 @@ typedef O::A TOA; typedef TOA TTOA; //------------ +static union { + int a; + char b; +}p_union; + +//------------ + int main () { diff --git a/gdb/testsuite/gdb.cp/koenig.exp b/gdb/testsuite/gdb.cp/koenig.exp index 8de3d11..57be745 100644 --- a/gdb/testsuite/gdb.cp/koenig.exp +++ b/gdb/testsuite/gdb.cp/koenig.exp @@ -64,6 +64,7 @@ gdb_test "p foo(go, fo, eo)" "= 6" #test that gdb fails gracefully gdb_test "p fake(eo)" "No symbol \"fake\" in current context." +gdb_test "p foo (fake)" "No symbol \"fake\" in current context." #test that namespaces of base classes are searched gdb_test "p foo(io)" "= 7" @@ -104,3 +105,7 @@ gdb_test "p M::N::bar('a')" "= 22" #test that lookup supports typedef gdb_test "p foo(ttoa, 'a')" "= 23" + +#test that lookup is not thwarted by anonymous types +gdb_test "p foo (p_union)" \ + "Cannot resolve function foo to any overloaded instance" |