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

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> ---
Reduced test-case:

$ cat ice.ii
inline namespace __cxx11 {
template <typename, typename = int> class basic_string;
}
template <int __v> struct N { static constexpr int value = __v; };
template <bool, typename _Tp> using __enable_if_t = _Tp;
struct C {
  template <typename _Up> using rebind = _Up;
};
template <typename, typename _Tp> using __ptr_rebind = C::rebind<_Tp>;
void *operator new(unsigned long, void *);
class L {
public:
  L();
};
class I;
template <typename _Facet> _Facet use_facet(I);
struct F {
  template <typename> using rebind_alloc = L;
};
namespace __cxx11 {
template <typename, typename> class basic_string {
  struct _Alloc_hider : F::rebind_alloc<int> {
    _Alloc_hider(int, L = L()) : _M_p() {}
    int _M_p;
  } _M_dataplus;
  void _M_destroy();

public:
  basic_string() : _M_dataplus(0) {}
  ~basic_string() {
    bool __trans_tmp_2 = _M_dataplus._M_p == 0;
    if (__trans_tmp_2)
      _M_destroy();
  }
  const wchar_t *data();
};
} // namespace __cxx11
class I {};
class _Sp_counted_base {
  virtual void _M_get_deleter();
};
struct K {
  L _M_a;
};
class O : _Sp_counted_base {
  class A {
  public:
    A(L);
  };

public:
  O(L p1) : _M_impl(p1) {}
  A _M_impl;
};
class J {
public:
  template <typename _Tp, typename _Alloc> J(_Tp, _Alloc p2) {
    new (0) O(p2._M_a);
  }
};
class H {
  using element_type = int;

protected:
  template <typename _Alloc> H(_Alloc p1) : _M_refcount(_M_ptr, p1) {}
  element_type _M_ptr;
  J _M_refcount;
};
class P : H {
  template <typename _Alloc> P(_Alloc p1) : H(p1) {}
  template <typename, typename _Alloc, typename...>
  friend P allocate_shared(const _Alloc &);
};
template <typename, typename _Alloc, typename...>
P allocate_shared(const _Alloc &) {
  return K{};
}
template <typename> P make_shared() { return allocate_shared<int>(L()); }
struct G {
  __ptr_rebind<int, int> _M_cur;
  __ptr_rebind<int, int> _M_first;
  __ptr_rebind<int, int> _M_last;
};
class D {
  G _M_map;
  long _M_map_size;
  G _M_start;
  G _M_finish;
};
class stack {
  D c;

public:
  stack() : c() {}
};
enum syntax_option_type : int;
syntax_option_type ECMAScript, __compile_nfa___flags;
class _Scanner {
public:
  _Scanner(wchar_t *, wchar_t *, syntax_option_type, I);
};
template <typename _TraitsT> class _Compiler {
public:
  typedef typename _TraitsT::char_type *_IterT;
  _Compiler(_IterT, _IterT, const typename _TraitsT::locale_type &,
            syntax_option_type);
  syntax_option_type _M_flags;
  _Scanner _M_scanner;
  P _M_nfa;
  typename _TraitsT::string_type _M_value;
  stack _M_stack;
  int _M_ctype;
};
template <typename, typename>
using __enable_if_contiguous_iter = __enable_if_t<N<false>::value, P>;
template <typename _TraitsT, typename _FwdIter>
__enable_if_contiguous_iter<_FwdIter, _TraitsT> __compile_nfa(_FwdIter) {
  typename _TraitsT::locale_type __loc;
  auto __cfirst = nullptr;
  using _Cmplr = _Compiler<_TraitsT>;
  _Cmplr(__cfirst, __cfirst, __loc, __compile_nfa___flags);
}
template <typename _TraitsT>
_Compiler<_TraitsT>::_Compiler(_IterT p1, _IterT p2,
                               const typename _TraitsT::locale_type &p3,
                               syntax_option_type)
    : _M_scanner(p1, p2, _M_flags, p3), _M_nfa(make_shared<_TraitsT>()),
      _M_ctype(use_facet<int>(p3)) {}
namespace __cxx11 {
struct M {
  typedef wchar_t char_type;
  typedef basic_string<char_type> string_type;
  typedef I locale_type;
};
class B {
public:
  B();
  template <typename _Ch_traits, typename _Alloc>
  void assign(basic_string<_Ch_traits, _Alloc> p1) {
    const wchar_t __trans_tmp_1 = *p1.data();
    B(&__trans_tmp_1, p1.data(), _M_loc, ECMAScript);
  }
  template <typename _FwdIter>
  B(_FwdIter, _FwdIter p2, I, syntax_option_type)
      : _M_automaton(__compile_nfa<M>(p2)) {}
  I _M_loc;
  P _M_automaton;
};
} // namespace __cxx11
void test01() {
  basic_string<wchar_t> s;
  B re;
  re.assign(s);
}

Reply via email to