binutils-gdb/gdb/testsuite/gdb.cp/pr12028.cc
Sami Wagiaalla ec32282347 Fix PR 12028: "GDB crashes on a double free during overload resolution "
2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	PR C++/12028
	* valops.c (find_oload_champ_namespace_loop): removed incorrect
	'old_cleanups' reassignment.

2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/pr12028.cc: New.
	* gdb.cp/pr12028.exp: New.
2010-09-22 15:48:59 +00:00

22 lines
215 B
C++

class A{};
class B{};
class C: public B {};
namespace D{
int foo (A) { return 11; }
int foo (C) { return 12; }
}
int main()
{
A a;
B b;
C c;
D::foo (a);
// D::foo (b);
D::foo (c);
return 0;
}