From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26449 invoked by alias); 2 Sep 2013 21:18:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26440 invoked by uid 89); 2 Sep 2013 21:18:47 -0000 Received: from avasout07.plus.net (HELO avasout07.plus.net) (84.93.230.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Sep 2013 21:18:47 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_SEMBLACK,RDNS_NONE autolearn=no version=3.3.2 X-HELO: avasout07.plus.net Received: from webmail.plus.net ([84.93.228.66]) by avasout07 with smtp id LMJi1m0031SbfYc01MJiGe; Mon, 02 Sep 2013 22:18:43 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=bbFSDo/B c=1 sm=1 tr=0 a=C5+YawzV8SR07mwocaP9vA==:117 a=rJgRRbfb+UpHm5KwX9t5uQ==:17 a=0Bzu9jTXAAAA:8 a=EDeDkkTReK4A:10 a=dYCPD3cKDi0A:10 a=0oDZLY-p00EA:10 a=5LfTt-Tm1vgA:10 a=IkcTkHD0fZMA:10 a=ZBkl__CYAAAA:8 a=mrHjP8x4AAAA:8 a=7vtFykjVAAAA:8 a=0tUAOcD9GN4A:10 a=Z5CXVn-8Qz5nsPk_Ql4A:9 a=QEXdDO2ut3YA:10 X-AUTH: jessaminenet+adam:2501 Received: from munkyhouse.force9.co.uk ([84.92.244.81]) by webmail.plus.net with HTTP (HTTP/1.1 POST); Mon, 02 Sep 2013 22:18:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 02 Sep 2013 21:18:00 -0000 From: Adam Butcher To: Jason Merrill Cc: , Gabriel Dos Reis , Andrew Sutton Subject: Re: [PATCH 1/4] Support lambda templates. In-Reply-To: <5224DA38.8050508@redhat.com> References: <1377632573-14453-1-git-send-email-adam@jessamine.co.uk> <1377632573-14453-2-git-send-email-adam@jessamine.co.uk> <5223A1FD.7080403@redhat.com> <4a32a5dbf7dc798f3b2aa4e9139662f6@imap.force9.net> <5224DA38.8050508@redhat.com> Message-ID: X-Sender: adam@jessamine.co.uk User-Agent: Roundcube Webmail/0.7.4 X-SW-Source: 2013-09/txt/msg00097.txt.bz2 On 02.09.2013 19:34, Jason Merrill wrote: > On 09/02/2013 02:30 PM, Adam Butcher wrote: >> On 01.09.2013 21:22, Jason Merrill wrote: >>> I bet we want convert_from_reference in the non-generic lambda >>> case, too. >>> >> I think I had made that change originally to keep the two impls the >> same >> and I hit issues with non-generic lambdas. But I can't remember the >> details. I'll try again. >> Okay, finally got around to trying this again. With convert_from_reference in the non-generic case, the code compiles okay but SEGVs on the attempt to branch to '_FUN'. │105 auto lf0 = [] (float& a, int const& b) { return a += b; }; │106 │107 INVOKEi (lf, float, 7, 0); >│108 AS_FUNi (lf, float, 7, 0); │109 AS_PTRi (lf, float, int, 7, 0); │0x404500 mov %eax,-0x4bc(%rbp) │0x404506 mov 0x36f0(%rip),%eax # 0x407bfc │0x40450c mov %eax,-0x4c0(%rbp) │0x404512 movl $0x7,-0x2a4(%rbp) │0x40451c lea -0x2a4(%rbp),%rdx │0x404523 lea -0x4bc(%rbp),%rax │0x40452a mov %rdx,%rsi │0x40452d mov %rax,%rdi >│0x404530 callq 0x400934 <::_FUN(float &, const int &)> >> If it works with convert_from_reference in >> both cases should I push or should I sort out the parameter pack >> conversion op issue and roll that up into this? > > I think roll them together, since that patch rewrites parts of this > one. > Will assume, for now, that the convert_from_reference call is not wanted in the non-generic case (maybe something to do with using 'build_call_a' instead of 'build_nt_call_vec' or the convert_from_reference on the call itself?) and will focus on the parameter pack stuff (when I get a chance). Cheers, Adam