From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15469 invoked by alias); 28 Apr 2003 13:05:38 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 15446 invoked by uid 48); 28 Apr 2003 13:05:38 -0000 Date: Mon, 28 Apr 2003 13:05:00 -0000 Message-ID: <20030428130538.15445.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gianni@mariani.ws, nobody@gcc.gnu.org From: reichelt@igpm.rwth-aachen.de Reply-To: reichelt@igpm.rwth-aachen.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gianni@mariani.ws, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/10511: tt.cpp:61: Internal compiler error in decay_conversion, at cp/typeck.c:1679 X-SW-Source: 2003-04/txt/msg01242.txt.bz2 List-Id: Synopsis: tt.cpp:61: Internal compiler error in decay_conversion, at cp/typeck.c:1679 State-Changed-From-To: open->closed State-Changed-By: reichelt State-Changed-When: Mon Apr 28 13:05:37 2003 State-Changed-Why: Fixed on 3.3 branch and mainline. The bug is still present in gcc 3.2.3, but since the 3.2 branch is closed now, there'll be no fix for the 3.2 branch. With 3.3 branch or mainline one gets 2 error messages instead of the ICE: PR10511.cc: In member function `void Zoo::B::Fooey(Zoo::A*)': PR10511.cc:59: error: assuming pointer to member `void Zoo::B::TFUNC_B(Zoo::A*) [with Zoo::A*Zoo::A::*w_aa = &Zoo::A::m_mem1, Zoo::A*Zoo::A::*w_ab = &Zoo::A::m_mem2, Zoo::A*Zoo::A::*w_ac = &Zoo::A::m_mem3, Zoo::A*Zoo::B::*w_ba = &Zoo::B::m_b1, Zoo::A*Zoo::B::*w_bb = &Zoo::B::m_b2, Zoo::A*Zoo::B::*w_bc = &Zoo::B::m_b3]' PR10511.cc:59: error: (a pointer to member can only be formed with `& Zoo::B::TFUNC_B(Zoo::A*) [with Zoo::A*Zoo::A::*w_aa = &Zoo::A::m_mem1, Zoo::A*Zoo::A::*w_ab = &Zoo::A::m_mem2, Zoo::A*Zoo::A::*w_ac = &Zoo::A::m_mem3, Zoo::A*Zoo::B::*w_ba = &Zoo::B::m_b1, Zoo::A*Zoo::B::*w_bb = &Zoo::B::m_b2, Zoo::A*Zoo::B::*w_bc = &Zoo::B::m_b3]') and PR10511.cc: In member function `void Zoo::B::TFUNC_B(Zoo::A*) [with Zoo::A*Zoo::A::*w_aa = &Zoo::A::m_mem1, Zoo::A*Zoo::A::*w_ab = &Zoo::A::m_mem2, Zoo::A*Zoo::A::*w_ac = &Zoo::A::m_mem3, Zoo::A*Zoo::B::*w_ba = &Zoo::B::m_b1, Zoo::A*Zoo::B::*w_bb = &Zoo::B::m_b2, Zoo::A*Zoo::B::*w_bc = &Zoo::B::m_b3]': PR10511.cc:59: instantiated from here PR10511.cc:52: error: invalid use of member (did you forget the `&' ?) PR10511.cc:52: error: comparison between distinct pointer types ` Zoo::A*Zoo::B::*' and `Zoo::A*' lacks a cast After fixing the first bug by writing ff gg = &B::TFUNC_B<... instead of ff gg = TFUNC_B<... the ICE on the 3.2 branch disappears and the second error message is printed. The second error message is discussed in PR 10514, so I won't comment on that one here. BTW, the ICE on the 3.2 branch can be shown with the following shorter example: ===========================snip here================================ struct A { struct B { template void foo () {} typedef void (B::* fptr)(); void bar() { fptr f = foo<0>; } // should be: fptr f = &B::foo<0>; }; }; ===========================snip here================================ Regards, Volker http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10511