fork download
  1. /*
  2.   Copyright Marek "p2004a" Rusinowski
  3.  
  4.   This code crashes both clang and g++ compilers
  5.  
  6.   reported to gcc: http://g...content-available-to-author-only...u.org/bugzilla/show_bug.cgi?id=60493
  7.   reported to clang: http://l...content-available-to-author-only...m.org/bugs/show_bug.cgi?id=19101
  8. */
  9. #include <iterator>
  10.  
  11. template <class T>
  12. class Splay {
  13. public:
  14. class iterator;
  15. };
  16.  
  17. template <class T, class D>
  18. class Splay<T>::iterator : std::iterator<std::forward_iterator_tag, D> {
  19. };
  20.  
  21. Splay<int>::iterator it;
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In instantiation of ‘class Splay<int>::iterator’:
prog.cpp:13:22:   required from here
prog.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 /home/EspP05/cc0Vhu9o.out file, please attach this to your bugreport.
stdout
Standard output is empty