https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106202

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
I reduced that to 12K:

namespace std {
template <typename> struct iterator_traits;
template <typename _Tp, _Tp __v> struct integral_constant {
  static constexpr _Tp value = __v;
};
using false_type = integral_constant<bool, false>;
template <typename...> using __void_t = void;
template <typename _Tp, typename _Up = _Tp> _Up __declval(int);
template <typename _Tp> auto declval() -> decltype(__declval<_Tp>(0));
template <typename>
struct is_same : integral_constant<bool, __is_same(int, int)> {};
template <typename _Base, typename _Derived>
struct is_base_of : integral_constant<bool, __is_base_of(_Base, _Derived)> {};
template <typename _Tp> struct remove_cv { using type = _Tp; };
template <typename _Tp> struct decay { typedef _Tp type; };
template <typename _Tp> using decay_t = decay<_Tp>::type;
template <typename _Tp, typename _Up>
constexpr bool is_same_v = __is_same(_Tp, _Up);
template <typename _Base, typename _Derived>
constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value;
template <typename _Tp> struct remove_cv<_Tp &> : remove_cv<_Tp> {};
template <typename _Tp> using remove_cvref_t = remove_cv<_Tp>::type;
template <typename _Tp> _Tp forward();
namespace __detail {
template <typename _Tp, typename _Up>
concept __weakly_eq_cmp_with = requires(_Tp __t, _Up __u) {
  __u != __t;
};
} // namespace __detail
template <typename _Tp>
concept equality_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp>;
template <typename _Tp>
concept totally_ordered = equality_comparable<_Tp>;
template <typename, typename> struct __iterator_traits;
namespace __detail {
template <typename _Iter>
concept __primary_traits_iter = __is_base_of(__iterator_traits<_Iter, void>,
                                             iterator_traits<_Iter>);
template <typename, typename> struct __iter_traits_impl;
template <typename _Iter, typename _Tp>
requires __primary_traits_iter<_Iter>
struct __iter_traits_impl<_Iter, _Tp> {
  using type = _Tp;
};
template <typename _Iter, typename _Tp>
using __iter_traits = __iter_traits_impl<_Iter, _Tp>::type;
template <typename _Tp>
using __iter_value_t = __iter_traits<_Tp, _Tp>::value_type;
} // namespace __detail
template <typename _Tp> using iter_value_t = __detail::__iter_value_t<_Tp>;
namespace ranges::__cust_access {
template <typename _Tp> auto __begin(_Tp __t) { return __t.begin(); }
} // namespace ranges::__cust_access
namespace __detail {
template <typename _Tp>
using __range_iter_t = decltype(ranges::__cust_access::__begin(_Tp()));
}
template <typename, typename = __void_t<>> struct __iterator_traits {};
template <typename _Iterator>
struct iterator_traits : __iterator_traits<_Iterator> {};
} // namespace std
struct __normal_iterator {
  typedef long value_type;
};
namespace std {
namespace ranges {
namespace __cust_access {
struct _Size {
  template <typename _Tp> auto operator()(_Tp __t) { return __t.size(); }
};
} // namespace __cust_access
int end;
__cust_access::_Size size;
template <typename>
concept range = requires {
  end;
};
template <typename _Tp> using iterator_t = __detail::__range_iter_t<_Tp>;
template <range _Range> using range_value_t = iter_value_t<iterator_t<_Range>>;
template <typename _Range> using range_size_t = decltype(size(_Range()));
} // namespace ranges
enum _Ios_Openmode {};
struct ios_base {
  static _Ios_Openmode binary;
};
template <typename> struct vector {
  typedef long size_type;
  __normal_iterator begin();
  size_type size();
};
} // namespace std
namespace testing {
namespace internal {
template <template <typename> class Tmpl> struct TemplateSel {
  template <typename T> struct Bind { typedef Tmpl<T> type; };
};
template <typename, typename... Tail_> struct Types {
  using Head = int;
  using Tail = Types<Tail_...>;
};
template <typename Head_> struct Types<Head_> {
  using Head = Head_;
  using Tail = int;
};
template <typename... Ts> struct ProxyTypeList { using type = Types<Ts...>; };
template <typename T> struct GenerateTypeList {
  using proxy = T;
  using type = proxy::type;
};
} // namespace internal
template <typename... Ts> using Types = internal::ProxyTypeList<Ts...>;
namespace internal {
template <class TestSel, typename Types> struct TypeParameterizedTest {
  static bool Register() {
    new typename TestSel::Bind<typename Types::Head>::type;
    TypeParameterizedTest<TestSel, typename Types::Tail>::Register;
    return false;
  }
};
template <class TestSel> struct TypeParameterizedTest<TestSel, int> {
  static bool Register;
};
} // namespace internal
struct Test {
  virtual void TestBody();
};
} // namespace testing
namespace cereal {
namespace detail {
struct OutputArchiveBase {};
struct InputArchiveBase {};
} // namespace detail
namespace traits {
using no = int;
template <bool> struct EnableIfHelper;
template <bool... Conditions> using EnableIf = EnableIfHelper<Conditions...>;
template <class T, class A> struct has_non_member_load_minimal_impl {
  template <class TT, class>
  static auto test()
      -> decltype(load_minimal(std::declval<A>(), std::declval<TT>(), int()));
  template <class, class> static no test();
  static const bool exists = std::is_same<decltype(test<T, A>)>::value;
};
template <int> struct has_non_member_load_minimal_wrapper : std::false_type {};
template <class T, class A>
struct has_non_member_load_minimal
    : std::integral_constant<
          bool, has_non_member_load_minimal_wrapper<
                    has_non_member_load_minimal_impl<T, A>::exists>::value> {};
struct is_specialized
    : std::integral_constant<bool, std::is_base_of<int, int>::value> {};
template <class T, class InputArchive>
struct count_input_serializers
    : std::integral_constant<
          int,
          std::integral_constant<
              bool,
              std::is_base_of<std::false_type, std::false_type>::value>::value
              ? std::integral_constant<bool,
                                       !std::is_base_of<int,
int>::value>::value
              : std::integral_constant<
                    bool, std::is_same<decltype(0)>::value>::value +
                    std::integral_constant<
                        bool, std::is_same<decltype(0)>::value>::value +
                    has_non_member_load_minimal<T, InputArchive>::value +
                    std::integral_constant<
                        bool, std::is_same<decltype(0)>::value>::value +
                    std::integral_constant<
                        bool, std::is_same<decltype(0)>::value>::value +
                    std::integral_constant<
                        bool, std::is_same<decltype(0)>::value>::value +
                    std::integral_constant<
                        bool, std::is_same<decltype(0)>::value>::value> {};
template <class T, class InputArchive>
struct is_input_serializable
    : std::integral_constant<bool,
                             count_input_serializers<T, InputArchive>::value> {
};
template <class T> struct strip_minimal { using type = T; };
} // namespace traits
struct OutputArchive : detail::OutputArchiveBase {};
class BinaryInputArchive;
struct InputArchive : detail::InputArchiveBase {
  template <class... Types> void operator()(Types...) {
    process(std::forward<Types>()...);
  }
  template <class T> void process(T head) { processImpl(head); }
  template <class T, traits::EnableIf<traits::is_input_serializable<
                         T,
BinaryInputArchive>(traits::is_specialized::value)>>
  void processImpl(T);
};
struct BinaryOutputArchive : OutputArchive {};
struct BinaryInputArchive : InputArchive {
  BinaryInputArchive(std::ios_base);
};
} // namespace cereal
template <typename t>
concept cereal_output_archive =
    std::is_base_of_v<cereal::detail::OutputArchiveBase, t>;
template <typename t>
concept cereal_input_archive =
    std::is_base_of_v<cereal::detail::InputArchiveBase, t>;
template <typename value_t, typename input_archive_t>
concept cerealisable =
    cereal::traits::is_input_serializable<value_t, input_archive_t>::value;
namespace detail {
template <typename type>
using strip_cereal_wrapper_t =
    cereal::traits::strip_minimal<std::decay_t<type>>::type;
}
auto to_rank = int{}, assign_rank_to = int{};
template <typename> using alphabet_rank_t = decltype(to_rank);
namespace bio::alphabet {
template <typename t>
concept semialphabet = std::totally_ordered<t>;
template <typename>
concept writable_semialphabet = requires {
  assign_rank_to;
};
template <cereal_input_archive archive_t, typename wrapped_alphabet_t>
void load_minimal(
    archive_t, wrapped_alphabet_t &&,
    alphabet_rank_t<
        detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>) requires
    semialphabet<detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>;
class dna4;
} // namespace bio::alphabet
namespace std {
struct basic_ifstream : ios_base {
  template <typename _Path> basic_ifstream(_Path, _Ios_Openmode);
};
} // namespace std
struct int_vector {
  long size();
};
namespace bio::ranges {
template <alphabet::writable_semialphabet> struct bitcompressed_vector {
  using data_type = int_vector;
  using size_type = std::ranges::range_size_t<data_type>;
  size_type size();
};
template <typename inner_type, typename data_delimiters_type =
                                   std::vector<typename inner_type::size_type>>
requires std::is_same_v<std::ranges::range_size_t<inner_type>,
                        std::ranges::range_value_t<data_delimiters_type>>
struct concatenated_sequences {
  data_delimiters_type data_delimitersdata_values;
  friend auto operator<=>(concatenated_sequences const &,
                          concatenated_sequences const &) = default;
};
} // namespace bio::ranges
int do_cerealisation_filename;
namespace bio {
template <cereal_input_archive in_archive_t, cereal_output_archive,
          typename value_t>
requires cerealisable<value_t, in_archive_t>
void do_cerealisation(value_t &&) {
  std::remove_cvref_t<value_t> in_l;
  std::basic_ifstream is{do_cerealisation_filename, std::ios_base::binary};
  in_archive_t iarchive{is};
  iarchive(in_l);
}
template <typename value_t> void do_serialisation(value_t l) {
  do_cerealisation<cereal::BinaryInputArchive, cereal::BinaryOutputArchive>(l);
}
} // namespace bio
struct container_of_container : testing::Test {};
using container_of_container_types = testing::Types<
    std::vector<std::vector<bio::alphabet::dna4>>,
    bio::ranges::concatenated_sequences<std::vector<bio::alphabet::dna4>>,
    bio::ranges::concatenated_sequences<
        bio::ranges::bitcompressed_vector<bio::alphabet::dna4>>>;
typedef testing::internal::GenerateTypeList<container_of_container_types>::type
    gtest_type_params_container_of_container_;
template <typename>
struct container_of_container_serialisation_Test : container_of_container {
  void TestBody();
};
bool gtest_container_of_container_serialisation_registered_ =
    testing::internal::TypeParameterizedTest<
        testing::internal::TemplateSel<
            container_of_container_serialisation_Test>,
        gtest_type_params_container_of_container_>::Register;
template <typename gtest_TypeParam_>
void container_of_container_serialisation_Test<gtest_TypeParam_>::TestBody() {
  gtest_TypeParam_ t1;
  bio::do_serialisation(t1);
}

$ g++-12 pr106202.ii -Wfatal-errors -std=c++20
pr106202.ii: In substitution of ‘template<class archive_t, class
wrapped_alphabet_t>  requires  cereal_input_archive<archive_t> void
bio::alphabet::load_minimal(archive_t, wrapped_alphabet_t&&,
alphabet_rank_t<typename cereal::traits::strip_minimal<typename
std::decay<wrapped_alphabet_t>::type>::type>) requires  semialphabet<typename
cereal::traits::strip_minimal<typename
std::decay<wrapped_alphabet_t>::type>::type> [with archive_t =
cereal::BinaryInputArchive; wrapped_alphabet_t =
bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>]’:
pr106202.ii:140:31:   required from ‘const bool
cereal::traits::has_non_member_load_minimal_impl<bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>, cereal::BinaryInputArchive>::exists’
pr106202.ii:146:8:   required from ‘struct
cereal::traits::has_non_member_load_minimal<bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>, cereal::BinaryInputArchive>’
pr106202.ii:165:67:   required from ‘struct
cereal::traits::count_input_serializers<bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>, cereal::BinaryInputArchive>’
pr106202.ii:175:8:   required from ‘struct
cereal::traits::is_input_serializable<bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>, cereal::BinaryInputArchive>’
pr106202.ii:188:47:   required by substitution of ‘template<class T,
cereal::traits::EnableIfHelper<(cereal::traits::is_input_serializable<T,
cereal::BinaryInputArchive>)(cereal::traits::is_specialized::value)>
<anonymous> > void cereal::InputArchive::processImpl(T) [with T =
bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>; cereal::traits::EnableIfHelper<(cereal::traits::is_input_serializable<T,
cereal::BinaryInputArchive>)(cereal::traits::is_specialized::value)>
<anonymous> = <missing>]’
pr106202.ii:187:56:   required from ‘void cereal::InputArchive::process(T)
[with T =
bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>]’
pr106202.ii:185:12:   required from ‘void
cereal::InputArchive::operator()(Types ...) [with Types =
{bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>,
std::vector<long int> >}]’
pr106202.ii:261:11:   required from ‘void bio::do_cerealisation(value_t&&)
[with in_archive_t = cereal::BinaryInputArchive; <template-parameter-1-2> =
cereal::BinaryOutputArchive; value_t =
ranges::concatenated_sequences<ranges::bitcompressed_vector<alphabet::dna4>
>&]’
pr106202.ii:264:76:   required from ‘void bio::do_serialisation(value_t) [with
value_t =
ranges::concatenated_sequences<ranges::bitcompressed_vector<alphabet::dna4> >]’
pr106202.ii:287:24:   required from ‘void
container_of_container_serialisation_Test< <template-parameter-1-1>
>::TestBody() [with <template-parameter-1-1> =
bio::ranges::concatenated_sequences<bio::ranges::bitcompressed_vector<bio::alphabet::dna4>
>]’
pr106202.ii:285:6:   required from here
pr106202.ii:27:7: internal compiler error: in move_fn_p, at cp/decl.cc:14985
   27 |   __u != __t;
      |   ~~~~^~~~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://bugs.opensuse.org/> for instructions.

Reply via email to