https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107003
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE in mangle_decl, at |ICE in mangle_decl, at
|cp/mangle.cc:4112 |cp/mangle.cc:4112 since
| |r6-1066-g233ce289250944dd
CC| |hubicka at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:
$ cat pr107003.ii
template < typename _Default, template < typename > class >
using __detected_or_t = _Default;
template < typename, typename > struct __replace_first_arg;
template < template < typename... > class _Template, typename _Up, typename
_Tp,
typename... _Types >
struct __replace_first_arg< _Template< _Tp, _Types... >, _Up > {
using type = _Template< _Up >;
};
template < typename _Tp > using __pointer = typename _Tp::pointer;
template < typename _Tp > struct __rebind : __replace_first_arg< _Tp, int > {};
template < typename _Alloc, typename >
using __alloc_rebind = typename __rebind< _Alloc >::type;
template < typename _Alloc > struct allocator_traits {
using pointer = __detected_or_t< typename _Alloc::value_type *, __pointer >;
template < typename _Tp > using rebind_alloc = __alloc_rebind< _Alloc, _Tp >;
static void deallocate(_Alloc __a, pointer __p, int __n) {
__a.deallocate(__p, __n);
}
};
template < typename _Alloc >
struct __alloc_traits : allocator_traits< _Alloc > {
template < typename > struct rebind {
typedef typename allocator_traits< _Alloc >::template rebind_alloc< int >
other;
};
};
template < typename _Alloc > struct _List_base {
typedef __alloc_traits< _Alloc > _Tp_alloc_traits;
typedef
typename _Tp_alloc_traits::template rebind< int >::other
_Node_alloc_type;
typedef __alloc_traits< _Node_alloc_type > _Node_alloc_traits;
struct : _Node_alloc_type {
} _M_impl;
typename _Node_alloc_traits::pointer _M_put_node___p;
_List_base() { _Node_alloc_traits::deallocate(_M_impl, _M_put_node___p, 1); }
};
namespace experimental {
inline namespace fundamentals_v2 {
void *deallocate___p;
long deallocate___bytes;
long deallocate___alignment;
struct memory_resource {
void deallocate() {
do_deallocate(deallocate___p, deallocate___bytes, deallocate___alignment);
}
virtual void do_deallocate(void *, unsigned long, unsigned long);
};
template < class > struct polymorphic_allocator {
using value_type = int;
void deallocate(int *, long) { _M_resource.deallocate(); }
memory_resource _M_resource;
};
inline void null_memory_resource() {
struct final : memory_resource {
void do_deallocate(void *, unsigned long, unsigned long) {}
};
}
template < typename _Tp >
using list = _List_base< polymorphic_allocator< _Tp > >;
} list< int > a;
}
started failing since r6-1066-g233ce289250944dd.