[Bug c++/45520] [4.6 Regression] [C++0x] compiler segmentation fault on decltype in lambda-declarator
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 4 18:55:00 GMT 2011
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
More information about the Gcc-bugs
mailing list