[Bug c++/95888] [9/10/11 Regression] Regression in 9.3. GCC freezes when compiling code using boost::poly_collection::segment

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 25 08:08:36 GMT 2020


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

cat pr95888.ii
template <typename PolyCollection> class local_iterator_impl {
  using const_segment_map_iterator =
      typename PolyCollection::const_segment_map_iterator;
  template <typename Iterator>
  local_iterator_impl(const_segment_map_iterator, Iterator);
  template <typename> friend class local_iterator_impl;
  friend PolyCollection;
};
template <typename> class poly_collection {
  template <typename> using enable_if_acceptable = int *;
  using segment_map = int;
  using const_segment_map_iterator = segment_map;
  template <typename> friend class local_iterator_impl;
  template <typename>
  using local_iterator_impl = local_iterator_impl<poly_collection>;
public:
  template <typename T> using const_local_iterator = local_iterator_impl<T>;
  template <typename> class const_segment_info {
  public:
    const_local_iterator<int> begin() { return {it, 0}; }
    const_segment_map_iterator it;
  };
  template <typename T, enable_if_acceptable<T> = nullptr>
  const_segment_info<T> segment();
};

int
main() {
  poly_collection<int> n;
  n.segment<int>().begin();
}


More information about the Gcc-bugs mailing list