This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/45520] [4.6 Regression] [C++0x] compiler segmentation fault on decltype in lambda-declarator


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]