public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "3dw4rd at verizon dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/49598] New: Ice on lambda with implicit capture by value.
Date: Thu, 30 Jun 2011 20:31:00 -0000	[thread overview]
Message-ID: <bug-49598-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49598

           Summary: Ice on lambda with implicit capture by value.
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: 3dw4rd@verizon.net


I have a brand new (r175707) 4.7 build on x86_64 GNU/Linux.

I saw an error with lambdas on stackoverflow:
-----------------------------------------------
#include <iostream>

using std::cout;
using std::endl;

int
main()
{
  int i = 10;
  int& ir = i;

  [=] // [i, ir] explicit capture works.
  {
      cout << "value capture" << endl
           << "i: " << i << endl
           << "ir: " << ir << endl
           << "&i: " << &i << endl
           << "&ir: " << &ir << endl
           << endl;
  }();
}
-----------------------------------------------

This is reduced somewhat.

I get:
-----------------------------------------------
[ed@localhost ~]$ ./bin/bin/g++ -std=c++0x -o lamb2 lamb2.cpp
lamb2.cpp: In function ‘int main()’:
lamb2.cpp:10:1: error: non-trivial conversion at assignment
int
int &
D.28407.__ir = ir;

lamb2.cpp:10:1: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
-----------------------------------------------


             reply	other threads:[~2011-06-30 20:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 20:31 3dw4rd at verizon dot net [this message]
2011-06-30 20:44 ` [Bug c++/49598] " 3dw4rd at verizon dot net
2011-07-02  0:53 ` [Bug c++/49598] [C++0x] " 3dw4rd at verizon dot net
2011-07-02 11:26 ` redi at gcc dot gnu.org
2011-07-05  5:14 ` jason at gcc dot gnu.org
2011-07-05 14:48 ` jason at gcc dot gnu.org
2011-07-05 14:52 ` jason at gcc dot gnu.org
2011-07-05 20:02 ` jason at gcc dot gnu.org
2011-07-16 17:30 ` iorate_stage at yahoo dot co.jp

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=bug-49598-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).