http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60493
Bug ID: 60493
Summary: g++ throws segmentation fault on simple code
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marekrusinowski at gmail dot com
Created attachment 32329
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32329&action=edit
Preprocessed source
This simple incorrect code (works here to: http://ideone.com/QPwEPO):
#include <iterator>
template <class T>
class Splay {
public:
class iterator;
};
template <class T, class D>
class Splay<T>::iterator : std::iterator<std::forward_iterator_tag, D> {
};
Splay<int>::iterator it;
Crashes g++ with output:
gcc_segfault.cpp: In instantiation of ‘class Splay<int>::iterator’:
gcc_segfault.cpp:13:22: required from here
gcc_segfault.cpp:10:17: internal compiler error: Segmentation fault
class Splay<T>::iterator : std::iterator<std::forward_iterator_tag, D> {
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccud4lbz.out file, please attach this to
your bugreport.
Proccessed source (/tmp/ccud4lbz.out) in attachment.
g++ version: "g++ (Debian 4.8.2-16) 4.8.2"