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++/45894] [4.5 Regression] [C++0x] ICE: segmentation fault with -Wall


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

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-02-02 17:08:14 UTC ---
... alternatively, I'll re-open PR 47589 as a separate non-C++0x bug on the 4.4
branch

here's a reduced testcase which makes 4.4.5 ICE, a regression since (at least)
4.1

typedef unsigned long long nsec_t;

class Engine { };

struct Fd
{
    typedef void(*Cb)(Engine*, Fd*, nsec_t);

    Fd(Cb cb);
};


namespace detail {

struct Cb
{
    template<class EventTag, class Derived> static void fd(Engine*, Fd*,
nsec_t);
};

}

template<class EventTag, class Derived>
struct TaggedFd : Fd
{
    TaggedFd()
        : Fd(detail::Cb::fd<EventTag, Derived>)
    {}
};


struct FdTag {};

struct DemuxTestClient
    : TaggedFd<FdTag, DemuxTestClient>
{
    DemuxTestClient() { }
};

$ ~/tools/Linux-x86_64/44/bin/g++ max.cc
max.cc: In constructor 'TaggedFd<EventTag, Derived>::TaggedFd() [with EventTag
= FdTag, Derived = DemuxTestClient]':
max.cc:37:   instantiated from here
max.cc:27: 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]