This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53921] New: [C++0x] ICE on lambda inside method of class template
- From: "philip.pronin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jul 2012 02:16:01 +0000
- Subject: [Bug c++/53921] New: [C++0x] ICE on lambda inside method of class template
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53921
Bug #: 53921
Summary: [C++0x] ICE on lambda inside method of class template
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: philip.pronin@gmail.com
$ g++ -std=c++0x -Wall -Wextra bug.cpp
bug.cpp: In lambda function:
bug.cpp:6:34: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
g++ --version
g++ (GCC) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
void bar(int) { }
template <class X>
struct B {
void foo() {
auto c = [this]() { bar(value); };
}
int value;
};
Additional info: not reproducible using gcc 4.6.2. Successfully compiles if you
access 'value' using 'this' (this->value).