From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26112 invoked by alias); 25 Apr 2013 07:13:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26082 invoked by uid 48); 25 Apr 2013 07:13:44 -0000 From: "thiago at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57064] [clarification requested] Which overload with ref-qualifier should be called? Date: Thu, 25 Apr 2013 07:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thiago at kde dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg02063.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57064 --- Comment #8 from Thiago Macieira 2013-04-25 07:13:44 UTC --- Hmm... this might be an effect of the same bug. Can you try this on 4.9? struct A { A p() const &; A &&p() &&; }; void f() { A().p().p(); } I get: leaq 15(%rsp), %rdi #, tmp60 call _ZNO1A1pEv@PLT # movq %rax, %rdi # D.69575, call _ZNKR1A1pEv@PLT # Is this second call supposed to be to R? If it's to O, it's exactly what I need to make the feature useful.