public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: reichelt@igpm.rwth-aachen.de
To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gianni@mariani.ws,
	nobody@gcc.gnu.org
Subject: Re: c++/10511: tt.cpp:61: Internal compiler error in decay_conversion, at cp/typeck.c:1679
Date: Mon, 28 Apr 2003 13:05:00 -0000	[thread overview]
Message-ID: <20030428130538.15445.qmail@sources.redhat.com> (raw)

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 <int> 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


             reply	other threads:[~2003-04-28 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-28 13:05 reichelt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-27  4:56 gianni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030428130538.15445.qmail@sources.redhat.com \
    --to=reichelt@igpm.rwth-aachen.de \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=gianni@mariani.ws \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).