From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25436 invoked by alias); 18 Jul 2005 12:17:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25423 invoked by uid 48); 18 Jul 2005 12:17:42 -0000 Date: Mon, 18 Jul 2005 12:19:00 -0000 From: "paul dot woegerer at nsc dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050718121738.22545.paul.woegerer@nsc.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22545] New: ICE with pointer to class member & user defined conversion operator X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg02204.txt.bz2 List-Id: 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