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

           Summary: ICE because of defaulted template destructor
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: s...@s-e-f-i.de


The following code makes rc1 of gcc-4.6.1 segfault:

template<typename T>
struct ConcretePoolKey
{
        virtual ~ConcretePoolKey();
};

template<typename T>
ConcretePoolKey<T>::~ConcretePoolKey() = default;

int main()
{
        ConcretePoolKey<int> foo;
}


/usr/bin/g++ -std=c++0x test.cpp
test.cpp: In destructor 'ConcretePoolKey<T>::~ConcretePoolKey() [with T =
int]':
test.cpp:13:1:   instantiated from here
test.cpp:2:8: internal compiler error: Segmentation fault

Reply via email to