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++/49921] New: Segfault during compilation, decltype and operator->*


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

           Summary: Segfault during compilation, decltype and operator->*
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: fabian.bergmark@gmail.com


Code:

#include <iostream>

class Local
{
    public:
        void func() {};
};

int main()
{
    Local* l = new Local;
    void(Local::*ptr)();
    ptr = &Local::func;
    decltype((l->*ptr)) i;
    std::cerr << typeid(i).name << std::endl;
}

Output:

gcc test.cpp -o test -std=c++0x
test.cpp: In function âint main()â:
test.cpp:15:22: internal compiler error: Segmenteringsfel
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.


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