https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80812
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-valid-code |ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2017-05-24 CC| |trippels at gcc dot gnu.org, | |ville at gcc dot gnu.org Summary|internal compiler error: in |[8 Regression] ICE: in |build_value_init_noctor, at |build_value_init_noctor, at |cp/init.c:483 |cp/init.c:483 Ever confirmed|0 |1 --- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- trippels@gcc67 ~ % cat foo.ii struct A; template <int> using __bool_constant = A; template <typename _Tp> struct B : __bool_constant<__is_constructible(_Tp)> {}; template <typename> struct C; template <typename _Tp> struct C<_Tp &> { typedef _Tp type; }; template <int> struct D; struct F { F(); }; template <typename, typename> using __alloc_rebind = F; struct G { template <typename _Tp> using rebind_alloc = __alloc_rebind<F, _Tp>; }; struct H { typedef G::rebind_alloc<int> other; }; struct I { struct : H::other { } _M_dataplus; }; template <typename> struct list; template <typename T> using _t = typename T::type; template <int> using bool_ = A; template <typename> struct _if_; template <int If> using if_c = _t<_if_<list<bool_<If>>>>; template <typename T> using uncvref_t = _t<C<T>>; template <typename T> T *_nullptr_v(); template <typename... Ts, typename Concept, typename = decltype(Concept::template requires_<Ts...>)> void models_(Concept *); template <typename Concept, typename... Ts> struct models : bool_<_t<decltype(models_<Ts...>(_nullptr_v<Concept>()))>::value> {}; template <typename Concept, typename... Ts> auto model_of() -> if_c<models<Concept, Ts...>::valueint>; struct J { template <typename T> void requires_(decltype(B<T>{})); }; struct K { template <typename T> void requires_(decltype(model_of<J, T>)); }; template <typename T> using View = models<K, T>; struct { template <typename T, int = D<(View<uncvref_t<T>>())>::type> void operator()(T &&); } all; void test_iter() { using P = I; P ia[]{{}}; all(ia); } trippels@gcc67 ~ % g++ -c foo.ii foo.ii: In instantiation of ‘struct B<I [1]>’: foo.ii:37:30: required by substitution of ‘template<class ... Ts, class Concept, class> void models_(Concept*) [with Ts = {I [1]}; Concept = J; <template-parameter-1-3> = <missing>]’ foo.ii:33:39: required from ‘struct models<J, I [1]>’ foo.ii:35:6: required by substitution of ‘template<class ... Ts, class Concept, class> void models_(Concept*) [with Ts = {I [1]}; Concept = K; <template-parameter-1-3> = <missing>]’ foo.ii:33:39: required from ‘struct models<K, I [1]>’ foo.ii:44:34: required by substitution of ‘template<class T, int <anonymous> > void<unnamed struct>::operator()(T&&) [with T = I (&)[1]; int <anonymous> = <missing>]’ foo.ii:50:9: required from here foo.ii:3:32: internal compiler error: in build_value_init_noctor, at cp/init.c:485