This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45894] [4.5 Regression] [C++0x] ICE: segmentation fault with -Wall
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 2 Feb 2011 17:08:48 +0000
- Subject: [Bug c++/45894] [4.5 Regression] [C++0x] ICE: segmentation fault with -Wall
- Auto-submitted: auto-generated
- References: <bug-45894-4@http.gcc.gnu.org/bugzilla/>
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