Commit 796cccfc by Mark Mitchell Committed by Mark Mitchell

re PR c++/22545 (ICE with pointer to class member & user defined conversion operator)

	PR c++/22545
	* call.c (add_builtin_candidate): Adjust for changes in
	representation of pointer-to-member types.

	PR c++/22545
	* g++.dg/expr/ptrmem7.C: New test.

From-SVN: r102500
parent 8d039470
2005-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/22545
* call.c (add_builtin_candidate): Adjust for changes in
representation of pointer-to-member types.
2005-07-28 Mike Stump <mrs@apple.com>
* pt.c (check_explicit_specialization): Add visibility logic.
......
......@@ -1701,7 +1701,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
if (IS_AGGR_TYPE (c1) && DERIVED_FROM_P (c2, c1)
&& (TYPE_PTRMEMFUNC_P (type2)
|| is_complete (TREE_TYPE (TREE_TYPE (type2)))))
|| is_complete (TYPE_PTRMEM_POINTED_TO_TYPE (type2))))
break;
}
return;
......
2005-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/22545
* g++.dg/expr/ptrmem7.C: New test.
2005-07-28 Mike Stump <mrs@apple.com>
* g++.old-deja/g++.mike/visibility-1.C: New test.
......
// PR c++/22545
struct A {
int member;
A() : member(13) {}
};
A a;
struct B {
operator A*() { return &a; }
};
B b;
int A::* member_pntr = &A::member;
int main()
{
return b ->* member_pntr;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment