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

--- Comment #2 from Neuron Teckid <neuront at bitfoc dot us> 2011-03-21 
13:01:38 UTC ---
I have reproduced this problem on Ubuntu (in a virtualbox guest), also GCC
4.7.0 experimental:

$ uname -a
Linux GCC4 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:29 UTC 2011 i686
GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure --enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20110321 (experimental) (GCC)

$ g++ crash.cpp -std=c++0x
In file included from
/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory:85:0,
                 from crash.cpp:2:
/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/unique_ptr.h:
In instantiation of ‘constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr() [with
_Tp = acceptor_of_pack, _Dp = std::default_delete<acceptor_of_pack>]’:
crash.cpp:5:8:   instantiated from ‘sptr<acceptor_of_pack>’
crash.cpp:27:30:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/unique_ptr.h:115:59:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

where crash.cpp is

/* BEGIN */
#include <list>
#include <memory>

template <typename _RawType>
struct sptr
    : public std::unique_ptr<_RawType>
{
    sptr() = default;
};

struct stmt_base;

std::list<sptr<stmt_base>> move(std::list<sptr<stmt_base>>&& rhs)
{
    return std::move(rhs);
}

sptr<int> _last_else_pos;
sptr<stmt_base const> _predicate;

struct acceptor;

sptr<acceptor> acccc;
std::list<sptr<acceptor>> _acceptors;

struct acceptor_of_pack;
sptr<acceptor_of_pack> const _packer;

#include <sstream>
/* END */

Reply via email to