https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65992
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-05-03 CC| |trippels at gcc dot gnu.org Ever confirmed|0 |1 Severity|major |normal --- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- markus@x4 tmp % cat BuildTests.pp.ii namespace std { template <typename _Tp, _Tp> struct integral_constant { static constexpr _Tp value = 0; }; template <typename> struct is_same : integral_constant<bool, false> {}; template <bool> struct enable_if; template <class> class initializer_list { int *_M_array; unsigned long _M_len; }; class A { int _M_t; }; } template <typename> class Gen { public: template <typename Impl = std::enable_if<std::is_same<int>::value>> Gen(Impl); std::A m_impl; }; namespace gen { void tuple(); template <typename> class B; template <typename Type, typename T> class B<T(Type::*)> { public: typedef T ValueType; }; template <typename Member> struct C { using LensT = B<Member>; using ValueType = typename LensT::ValueType; using GenT = Gen<ValueType>; GenT gen; }; template <typename T> Gen<T> construct(); template <typename Member> C<Member> set(Member, typename C<Member>::GenT); template <typename T, typename... Members> void build(Gen<T>, const C<Members> &... bs) { [=] { [&] { auto dummy = {(bs, 0)...}; }; }; } } template <typename> struct Foobar { void setB(); void setCD(); int e; }; void ____C_A_T_C_H____T_E_S_T____185() { build(gen::construct<Foobar<int>>(), gen::set(&Foobar<int>::setB, 0), gen::set(&Foobar<int>::setCD, gen::tuple), gen::set(&Foobar<int>::e, 0)); } markus@x4 tmp % g++ -std=c++11 -c BuildTests.pp.ii BuildTests.pp.ii: In function ‘void gen::build(Gen<T>, const gen::C<Members>& ...) [with T = Foobar<int>; Members = {void (Foobar<int>::*)(), void (Foobar<int>::*)(), int Foobar<int>::*}]’: BuildTests.pp.ii:36:6: internal compiler error: in execute, at cfgexpand.c:6044 void build(Gen<T>, const C<Members> &... bs) { ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.