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++/49507] New: ICE because of defaulted template destructor


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: unassigned@gcc.gnu.org
        ReportedBy: sefi@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


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