Compiling the example below with g++ from snapshot 4.1.0 20050716 causes the following error message:
> g++ -S cpp_parse_internal_error.cpp cpp_parse_internal_error.cpp: In function 'int main()': cpp_parse_internal_error.cpp:23: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in is_complete, at cp/call.c:1567 Compiling the same example with 3.4.4 works perfectly and correctly returns 13 as result. The behaviour does not depend on the optimization level (O0, O3 all the same) ------------------------------------------- cpp_parse_internal_error.cpp 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() { // That one WORKS // A *a_pntr = b; // return a_pntr ->* member_pntr; // But this one causes an INTERNAL ERROR return b ->* member_pntr; } -- Summary: ICE with pointer to class member & user defined conversion operator Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: paul dot woegerer at nsc dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22545