This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45520] [4.6 Regression] [C++0x] compiler segmentation fault on decltype in lambda-declarator
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 4 Jan 2011 18:55:18 +0000
- Subject: [Bug c++/45520] [4.6 Regression] [C++0x] compiler segmentation fault on decltype in lambda-declarator
- Auto-submitted: auto-generated
- References: <bug-45520-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45520
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.04 18:55:10
Summary|[C++0x] Regression: |[4.6 Regression] [C++0x]
|compiler segmentation fault |compiler segmentation fault
|on decltype from a |on decltype in
|dereferenced map iterator |lambda-declarator
Ever Confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-04 18:55:10 UTC ---
Reduced ...
struct M {
int i;
};
struct S {
M m;
void f() {
auto lambda=[&](decltype(m.i) & i) { };
}
};
Program received signal SIGSEGV, Segmentation fault.
thisify_lambda_field (decl=0x2aaaaac0d4c0)
at ../../gcc-4.6-20110101/gcc/cp/semantics.c:7901
7901 tree object = cp_build_indirect_ref (DECL_ARGUMENTS (context),
(gdb) p context
$1 = (tree) 0x0
it works if decltype(*this->m.i) is used instead