This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66371] ICE: canonical types differ for identical types
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Jun 2015 13:44:47 +0000
- Subject: [Bug c++/66371] ICE: canonical types differ for identical types
- Auto-submitted: auto-generated
- References: <bug-66371-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66371
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-02
CC| |trippels at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
This is what creduce came up with:
trippels@gcc75 ~ % cat cc.ii
namespace std {
template <typename _Tp, _Tp> struct A;
template <typename, typename> struct B;
template <bool> struct enable_if;
template <typename> class allocator;
template <typename = allocator<int>> class vector {};
}
namespace meta {
template <typename T, T...> struct C;
template <bool B> using bool_ = std::A<bool, B>;
template <typename> struct D;
template <template <typename> class> struct quote;
template <bool... Bools> using and_c = std::B<C<bool, Bools...>, C<bool>>;
template <typename> using fast_and = and_c<>;
}
template <typename I, typename> using common_iterator = I;
template <typename T> struct static_const { static constexpr T value{}; };
template <typename> int _nullptr_v;
template <typename Concept>
struct F : meta::bool_<decltype(_nullptr_v<Concept>)::value> {};
template <typename...> using Constructible = struct View;
template <typename> using range_iterator_t = View;
template <typename> using range_sentinel_t = View;
template <typename Rng>
using range_common_iterator_t =
common_iterator<range_iterator_t<Rng>, range_sentinel_t<Rng>>;
template <typename, typename I> using ReserveAndAssignable = F<I>;
template <typename Rng, typename = range_common_iterator_t<Rng>>
using ConvertibleToContainer = meta::fast_and<Constructible<>>;
template <typename> struct to_container_fn {
template <typename C, typename R>
using ReserveConcept = meta::fast_and<ReserveAndAssignable<C, R>>;
template <typename Rng, typename Cont,
typename std::enable_if<ConvertibleToContainer<Cont>() &&
ReserveConcept<Cont, Rng>()>::type>
void m_fn1();
};
auto to_vector =
static_const<to_container_fn<meta::quote<std::vector>>>::value;
template <typename Cont> to_container_fn<meta::D<Cont>> to_();
struct G {
operator std::vector<std::allocator<int>>() { to_<std::vector<>>(); }
};
trippels@gcc75 ~ % g++ -std=c++14 -c cc.ii
cc.ii: In instantiation of ?struct
to_container_fn<meta::D<std::vector<std::allocator<int> > > >?:
cc.ii:41:68: required from here
cc.ii:36:8: internal compiler error: canonical types differ for identical types
std::enable_if<(ConvertibleToContainer<Cont>() && to_container_fn<
<template-parameter-1-1> >::ReserveConcept<Cont, Rng>())> and
std::enable_if<(ConvertibleToContainer<Cont, range_common_iterator_t<Cont> >()
&& to_container_fn<meta::quote<std::vector> >::ReserveConcept<Cont, Rng>())>
void m_fn1();
^