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
This commit is contained in:
parent
8d039470f6
commit
796cccfcc3
@ -1,3 +1,9 @@
|
||||
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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
21
gcc/testsuite/g++.dg/expr/ptrmem7.C
Normal file
21
gcc/testsuite/g++.dg/expr/ptrmem7.C
Normal file
@ -0,0 +1,21 @@
|
||||
// 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user